change date of file in linux code example
Example 1: how to change date of file in linux
/*how to change date of file in linux*/
touch -a -m -t 201512180130.09 fileName.ext
-a = accessed
-m = modified
-t = timestamp - use [[CC]YY]MMDDhhmm[.ss] time format
Example 2: linux change date and then change files ctime
$ NOW=$(date) && date -s "2030-08-15 21:30:11" && touch file.txt && date -s "$NOW"