Here is my created file using linux command.touch tmp.txtNow i tried to replace it date and time so what i did is as follows:ls -l tmp.txt-rwrx-rx-x 1 yush guest 600 jul 10 16:58 tmp.txtI had used the following command to replace year for the above cretaed file?touch -d 1 year ago tmp.txtNow,ls -l tmp.txt -rwxr-xr-x 1 yush guest 600 jul 10 2016 tmp.txtMy query is there any other command to do the above things using linux?
Different ways to modify the created file time and date using linux command?
files;timestamps
Explicitly Set the Access and Modification time:# touch -t [[CC]YY]MMDDhhmm[.SS]e.g.# touch -t 201212101830.55 tmp.txt# touch -d 2012-10-19 12:12:12.000000000 +0530 tmp.txt# touch -d 2017-10-19 14:59:12 tmp.txtYou can use the time stamp of another file:# touch -r file1.txt file2.txt