Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
'One of the files in /etc/{conf.d,init.d} or /etc/rc.conf ha
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
atatut
n00b
n00b


Joined: 27 Jun 2007
Posts: 49

PostPosted: Sun Aug 19, 2007 11:36 pm    Post subject: 'One of the files in /etc/{conf.d,init.d} or /etc/rc.conf ha Reply with quote

Tip to get rid of the following error message

'One of the files in /etc/{conf.d,init.d} or /etc/rc.conf has a modification time in the future'

Know that the above error message may refer to other files in other paths.

Why should I care?

While just annoying at boot time, it can also cause some emerge to fail because of clock skew. This error message will probably appear after you successfuly changed your system time, using the date command or the ntp service. If your system is networked then you should use the ntp service to ensure your system stays in time.

How to get rid of it?

use the touch command as follow:

touch -m /thepath/of/thefile/that/has/amodification/in/thefuture/*

this will change the modification time of all the files within the folder to the current system time. The -m switch makes the touch only change the modification time, it's just what we want.

Can I change the time of all the files on my system just to be sure with a single command?

I don't know how to do that with the touch command as it seems there's no -R switch to make the touch command work recursively on the whole system in a single command, something like:

touch -mR /*

maybe someone has some idea?
_________________
“When I left you, I was but the learner, now I am the master.”
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Mon Aug 20, 2007 5:03 am    Post subject: Reply with quote

atatut wrote:
maybe someone has some idea?
Try using find.
Back to top
View user's profile Send private message
embobo
Guru
Guru


Joined: 19 May 2003
Posts: 311

PostPosted: Mon Aug 20, 2007 7:32 pm    Post subject: Re: 'One of the files in /etc/{conf.d,init.d} or /etc/rc.con Reply with quote

Code:

find /etc/{conf.d,init.d} /etc/rc.conf -mtime -0


may help you find the file to touch.

atatut wrote:

Can I change the time of all the files on my system just to be sure with a single command?

I don't know how to do that with the touch command as it seems there's no -R switch to make the touch command work recursively on the whole system in a single command, something like:

touch -mR /*

maybe someone has some idea?


Wow, I would never, ever update the mtime of every file on my system, but here you go:

Code:

find / -type f -print0 | xargs touch -m


:twisted:
Back to top
View user's profile Send private message
likewhoa
l33t
l33t


Joined: 04 Oct 2006
Posts: 778
Location: Brooklyn, New York

PostPosted: Mon Aug 20, 2007 9:27 pm    Post subject: Reply with quote

Code:
find /etc/{conf.d,init.d} -type f -exec touch {} \;


should do it.
Back to top
View user's profile Send private message
gm7uac
n00b
n00b


Joined: 17 Apr 2004
Posts: 57
Location: Glasgow

PostPosted: Sun Jan 06, 2008 8:48 pm    Post subject: Reply with quote

likewhoa wrote:
Code:
find /etc/{conf.d,init.d} -type f -exec touch {} \;


should do it.


Hi, that worked for me :-) but I also like to understand how? just checked the man page and info touch and I still don't understand the syntax you have used with touch { } \ ;
_________________
If all else fails RTFM.
Back to top
View user's profile Send private message
embobo
Guru
Guru


Joined: 19 May 2003
Posts: 311

PostPosted: Mon Jan 07, 2008 1:50 am    Post subject: Reply with quote

gm7uac wrote:
likewhoa wrote:
Code:
find /etc/{conf.d,init.d} -type f -exec touch {} \;


should do it.


Hi, that worked for me :-) but I also like to understand how? just checked the man page and info touch and I still don't understand the syntax you have used with touch { } \ ;


This is from the find man page, specifically the section on -exec:

Quote:

All following
arguments to find are taken to be arguments to the command until
an argument consisting of `;' is encountered. The string `{}'
is replaced by the current file name being processed everywhere
it occurs in the arguments to the command, not just in arguments
where it is alone, as in some versions of find. Both of these
constructions might need to be escaped (with a `\') or quoted to
protect them from expansion by the shell.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum