B balanga Sep 2, 2023 #1 According to date() you can show the date three days ago using date -v -3d and you can change the date of a file using touch -d ****** filename I'm trying to do something like touch -d `date -v -3d` filename but can't find the magic words. Please help
According to date() you can show the date three days ago using date -v -3d and you can change the date of a file using touch -d ****** filename I'm trying to do something like touch -d `date -v -3d` filename but can't find the magic words. Please help
OP B balanga Sep 2, 2023 Thread Starter #3 covacat said: use touch -d $(date -v -3d +%Y-%m-%dT%H:%M:%S) filename Click to expand... Thanks for the formatting, although I needed to change the command to touch -d `date -v -3d +%Y-%m-%dT%H:%M:%S` filename
covacat said: use touch -d $(date -v -3d +%Y-%m-%dT%H:%M:%S) filename Click to expand... Thanks for the formatting, although I needed to change the command to touch -d `date -v -3d +%Y-%m-%dT%H:%M:%S` filename