LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Update timestamps of entire system heirarchy? (https://www.linuxquestions.org/questions/linux-newbie-8/update-timestamps-of-entire-system-heirarchy-4175522966/)

coralfang 10-21-2014 05:14 PM

Update timestamps of entire system heirarchy?
 
What's the safest way to update the timestamp of every file that has a specific date on the system?

I recently installed slackware onto a raspberry pi, and during the install and shortly after i did not set the clock, so many system and user files appear as the unix epoch 0 (jan 1st 1970).

Because of OCD, i want to update them. I'm weary of using "touch" however, as i don't want to break anything.

Is it safe to do something like this?
Code:

# find / -exec touch {} \;
However, i only want to "touch" files that match, Jan 1 1970.

Thanks.

Didier Spaier 10-22-2014 02:13 PM

Include a test of -atime +n or -ctime +n,

n being slightly smaller than the number of days since jan 1st 1970.

Check your command first, of course.


All times are GMT -5. The time now is 08:33 PM.