changing lots of file dates?

rikona rikona at sonic.net
Thu Jul 28 00:57:00 UTC 2022


I had to do a restore of lots of data files back a bit, from a backup
disk. That did restore the files, but for some reason the 'modified'
date for all these files got set to a date way in the past - way earlier
than the 'create' date. May be 100K files or so. That backup no longer
exists, so I can't 'redo' the restore to fix the problem.

Is there a way to SAFELY reset all these on the disk using the
following conditions:
(1) if the modified date is earlier than the create date, set the mod
date to the create date.
(2) if the modified date is later than or = to the
create date, do not change the mod date.
(3) do not change any other date, and don't make the mod or access date
the date when this was done.




More information about the ubuntu-users mailing list