LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 05:14 PM   #1
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
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 05:16 PM.
 
Old 10-22-2014, 02:13 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

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.
 
  


Reply



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 03:16 PM
yum update breaks entire laptop? ShellPwn Linux - Laptop and Netbook 3 08-31-2009 05:06 AM
timestamps dont comply with hardware or system time leontini Linux - General 2 04-04-2007 05:20 AM
LXer: Move an entire file system on a live Unix system LXer Syndicated Linux News 0 07-08-2006 05:33 PM
Linux heirarchy tree arkamir Linux - Newbie 2 12-29-2003 04:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:14 AM.

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
Open Source Consulting | Domain Registration