On Nov 8, Steve Dobson ([EMAIL PROTECTED]) wrote: > On Wed, Nov 08, 2000 at 06:32:37AM -0500, Neil L. Roeth wrote: > > On Nov 8, Sale, Nigel ([EMAIL PROTECTED]) wrote: > > > I have a rather old 486 laptop which had a bit of a funny turn the > > other day and advanced the date by 20 years !. It was a couple of days > > before i realised and now i have a load of files with are dated 20 years > > in the future. > > > > > > Does anybody know how i can first find all these files ? I'm sure i > > should be able to use the find comand but can't find the right options, > > > And secondly, any way to subract 20 yeats from a files creation date ? > > > > To find them, you could set your system date to 1 day after that > > future date and user find / -mtime -1 -print. > > > > You can use touch to set the file time to be whatever you want. > > > > On the other hand if you now have your system time set correctly and > you don't want to change is use find's -cnewer option. > > # touch /tmp/file_now > # find / -cnewer /tmp/file_now > > will list them and > > # touch /tmp/file_now > # find / -cnewer /tmp/file_now | xargs touch > > will reset the date. > > Steve
Yup, that's better. Didn't think of it. -- Neil L. Roeth neil-at-occamsrazor.net