changing lots of file dates?

rikona rikona at sonic.net
Thu Jul 28 17:40:28 UTC 2022


On Wed, 27 Jul 2022 18:00:24 -0700
Dave Stevens <geek at uniserve.com> wrote:

> what filesystem is this?

Good question - it's ext4. Sorry, I'm so used to using ext I didn't
think to mention it, but there are others...
> 
> 
> 
> On Wednesday 27/07/2022 at 5:58 pm, rikona  wrote:
> > 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.
> >
> > --
> > ubuntu-users mailing list
> > ubuntu-users at lists.ubuntu.com
> > Modify settings or unsubscribe at: 
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users  
> 





More information about the ubuntu-users mailing list