Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-21-2014, 06:14 PM   #1
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 762
Blog Entries: 3

Rep: Reputation: 246Reputation: 246Reputation: 246
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?
# find / -exec touch {} \;
However, i only want to "touch" files that match, Jan 1 1970.


Last edited by coralfang; 10-21-2014 at 06:16 PM.
Old 10-22-2014, 03:13 PM   #2
Didier Spaier
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64- on Lenovo Thinkpad W520
Posts: 9,109

Rep: Reputation: Disabled
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] After 389-ds update dirsrv will no longer start => entire server dead martdj Linux - Server 1 09-25-2010 04:16 PM
yum update breaks entire laptop? ShellPwn Linux - Laptop and Netbook 3 08-31-2009 06:06 AM
timestamps dont comply with hardware or system time leontini Linux - General 2 04-04-2007 06:20 AM
LXer: Move an entire file system on a live Unix system LXer Syndicated Linux News 0 07-08-2006 06:33 PM
Linux heirarchy tree arkamir Linux - Newbie 2 12-29-2003 05:54 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:23 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration