[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A little off topic...laptop date.

[Charset ISO-8859-1 unsupported, filtering to ASCII...]
> Sorry if this is off topic, but this is the most relevant list i 
> subscribe to,
> 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 ?

If you
	cd /
	find . -daystart -ctime 0 -ls 

it seems to find all files that are from today (as of just past midnight)
into the far future.  (I tested by using touch with the -d option to put
a 2032 date on some webfile I am messing with.)

With the -ls option on there, all your future files will be obvious, because
the ones from today won't mention the year.  You could do the same command
without ls to get them all into a file so you can do a touch and bring them
back to a sane time, if you want.  It'd be more complicated, but potentially
more fun and/or useful, to figure out what the offset is, and cook up a
bash script which actually subtracted the time on things.  Not exactly what
everybody wants to do with their afternoon tho.

> Thanks in advance,
> Nige

Best of luck

* Heather Stern * star@ many places...

Reply to: