LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-28-2013, 09:56 PM   #1
peterlowrie
Member
 
Registered: May 2009
Location: New Zealand
Distribution: mdv-x86/aurora-sparc64/solaris10-x86/solaris10-sparc
Posts: 42

Rep: Reputation: 15
filestamps dated in future, X won't boot anymore


Dear Groupsters

The battery on my machine was the wrong shape (flat) so I put a new one in. Then by mistake I put the wrong date into BIOS. I put August instead of July. When I noticed the mikate, oops mistake, I of course, changed the date to July but now X wont run.

I can access the machine via another box. Zeroconf, fish, ssh etc all work and the *dm is also running but I cannot log in via the X gui therefore xdmcp wont work either.

I was able to fsck.ext4 the filesystem and I thort that this would change the dates but it didn't.

Does anyone know how I can change the timestamps on the affected files? I've not found any man pages or howtro's that describe what to do. I'm hoping that if I can fix the dates on various files this will be one step in the direction of bringing X login up again.

Thanks
Peter
 
Old 07-29-2013, 12:02 AM   #2
MemoryLeak
LQ Newbie
 
Registered: Jul 2013
Posts: 4

Rep: Reputation: 1
If I understand your problem correctly, the 'touch' command may be what you are looking for. Assuming that your system clock is accurate, touch should update the timestamp to the current time. The touch command also allows you to set the date yourself with the --date=STRING option.

Please try 'man touch' to see if it will help you. You may need to touch files in at least one directory recursively, and possibly as the root user.

I hope this helps.
 
Old 07-29-2013, 06:42 PM   #3
peterlowrie
Member
 
Registered: May 2009
Location: New Zealand
Distribution: mdv-x86/aurora-sparc64/solaris10-x86/solaris10-sparc
Posts: 42

Original Poster
Rep: Reputation: 15
Thumbs up OK, that worked. Here's how I did it!

Quote:
Originally Posted by MemoryLeak View Post
If I understand your problem correctly, the 'touch' command may be what you are looking for. Assuming that your system clock is accurate, touch should update the timestamp to the current time. The touch command also allows you to set the date yourself with the --date=STRING option.

Please try 'man touch' to see if it will help you. You may need to touch files in at least one directory recursively, and possibly as the root user.

I hope this helps.
Yes. THANK YOU!!!

I took a look at the touch man page and decided to use the '--reference=' method.

I created a file thus:>touch timefile

Then I did
:>touch -c --reference=timefile *
:>touch -c --reference=timefile *.*
:>touch -c --reference=timefile ./.* # to change any hidden files and dirs without extentions, and
:>touch -c --reference=timefile ./.*.* # to change the " files having extentions.

I did not see a way to parse directories so it's a matter of changing to those dirs and repeat above. I was able to do it in my home dir without sudo or root access.

Now I'm going to see if I can boot X. I will report back for the sake of future users referencing these posts.

:-) Peter
 
Old 07-30-2013, 05:51 PM   #4
MemoryLeak
LQ Newbie
 
Registered: Jul 2013
Posts: 4

Rep: Reputation: 1
Great! I'm happy to be of assistance. I assume that the timestamp fix allowed you to be able to boot X. Is that right?
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub help - XP won't boot anymore lt2007 Linux - Newbie 5 09-27-2007 09:26 AM
Linux won't boot anymore warTUX Linux - General 2 03-18-2004 01:51 AM
Mandy won't boot anymore :( Redeye2 Mandriva 5 03-10-2004 11:06 PM
grub won't boot anymore.... quark Linux - Newbie 3 07-29-2003 11:32 AM
Redhat 8 won't boot anymore :( steppin_razor Linux - Software 3 04-16-2003 11:31 PM


All times are GMT -5. The time now is 09:59 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration