View previous topic :: View next topic |
Author |
Message |
atatut n00b
Joined: 27 Jun 2007 Posts: 49
|
Posted: Sun Aug 19, 2007 11:36 pm Post subject: 'One of the files in /etc/{conf.d,init.d} or /etc/rc.conf ha |
|
|
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 |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Mon Aug 20, 2007 5:03 am Post subject: |
|
|
atatut wrote: | maybe someone has some idea? | Try using find. |
|
Back to top |
|
|
embobo Guru
Joined: 19 May 2003 Posts: 311
|
Posted: Mon Aug 20, 2007 7:32 pm Post subject: Re: 'One of the files in /etc/{conf.d,init.d} or /etc/rc.con |
|
|
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
|
|
|
Back to top |
|
|
likewhoa l33t
Joined: 04 Oct 2006 Posts: 778 Location: Brooklyn, New York
|
Posted: Mon Aug 20, 2007 9:27 pm Post subject: |
|
|
Code: | find /etc/{conf.d,init.d} -type f -exec touch {} \; |
should do it. |
|
Back to top |
|
|
gm7uac n00b
Joined: 17 Apr 2004 Posts: 57 Location: Glasgow
|
Posted: Sun Jan 06, 2008 8:48 pm Post subject: |
|
|
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 |
|
|
embobo Guru
Joined: 19 May 2003 Posts: 311
|
Posted: Mon Jan 07, 2008 1:50 am Post subject: |
|
|
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 |
|
|
|