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

Re: fixing date stamp on files

On Tue 05 Oct 1999, Ron Farrer wrote:
> I recently upgraded to a 2.2.12 kernel and the clock got screwed. One time it was 1903 and another time it
> was > 2000 (2019 and 2038). What would be the best method of finding files with incorrect dates and
> changing them?

Try something like

    find / -mtime -0 -o -mtime +11000 | xargs touch

-mtime -0 will catch all files modified in the future,
-mtime +11000 will catch all files modified more than 30 years ago.
Touch will then modify the timestamp to "now".

Paul Slootman
home:       paul@wurtel.demon.nl http://www.wurtel.demon.nl/
work:       paul@murphy.nl       http://www.murphy.nl/
debian:     paul@debian.org      http://www.debian.org/
isdn4linux: paul@isdn4linux.de   http://www.isdn4linux.de/

Reply to: