update
1 Using touch to modify file access and modification times
Touch is a unix utility to set mod and access times of files. If the file does not exist, then it is created.
For a full breakdown on what touch can do, use man touch This is just some common settings I have used in the past.
2 Hard set to a specific date and time
touch –t YYYYMMDDhhmm.ss filename.txt
3 Adjust existing date and time forward or backward
3.1 By one day
- Forward:
touch -A 240000 *.AVI
- Backward:
touch -A -240000 *.AVI
3.2 By one week
Add four days (96 hours, 00 minutes, 00 seconds)
touch -A 960000 *.AVI
Add 3 days days (72 hours, 00 minutes, 00 seconds)
touch -A 72k 0000 *.AVI