5

I want to change the created timestamp of many images one week ago. Code

% http://askubuntu.com/a/62496/25388
touch -d "7 days ago" *.png

Output

touch: invalid date format ‘1 one ago’

OS: Debian 8.5

1 Answers1

8

You need to use - foo format:

$ ls -l file
-rw-r--r-- 1 terdon terdon 0 Nov 29 11:05 file
$ touch -d '-1 week' file 
$ ls -l file
-rw-r--r-- 1 terdon terdon 0 Nov 22 11:06 file
terdon
  • 242,166