Is there a way to change the date when a file was modified/created (which is shown in Nautilus or with the ls -l command)? Ideally I am looking for a command which can change the date/time stamps of a whole bunch of files to a certain amount of time earlier or later (e.g. +8 hours or -4 days etc.).
You can change the modification time of a file using the
By default this will set the file's modification time to the current time, but there are a number of flags, such as the
If you want to modify the file relative to its existing modification time instead, the following should do the trick:
If you want to modify a large number of files, you could use the following:
You can change the arguments to
This form isn't possible with the file time relative version because it uses the shell to form the arguments to
As far as the creation time goes, most Linux file systems do not keep track of this value. There is a
Thanks for the help. This worked for me:
In the terminal go to the directory for date-edit. Then type:
You wil see a ">" after you hit enter, exept for the last time -> "done".
Note: You may want to change "201203101513"
"201203101513" = is the date you want for all the files in this directory.
just change date and time in settings. then save your file, it automatically changes