LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-21-2014, 06:14 PM   #1
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 384
Blog Entries: 2

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

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-14.2beta2 on Lenovo Thinkpad W520
Posts: 6,776

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


Reply


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


All times are GMT -5. The time now is 10:31 PM.

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