LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-14-2007, 10:41 PM   #1
Rhiaanon
LQ Newbie
 
Registered: Mar 2007
Posts: 4

Rep: Reputation: 0
Unhappy Tried to set time with hwclock and entered something wrong!


Hi All,

I typed the following:

hwclock --set --date="3/14/2007 "21:00:00"

One to many quotation marks. Now I have > for a prompt. Also, the system will not act on any command I enter. Please help! Thanks to all in advance.
 
Old 03-14-2007, 11:03 PM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
<Ctrl-C> will usually abort a non-terminated command.
 
Old 03-14-2007, 11:29 PM   #3
Rhiaanon
LQ Newbie
 
Registered: Mar 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by PTrenholme
<Ctrl-C> will usually abort a non-terminated command.

Thank you so much!
 
Old 03-14-2007, 11:29 PM   #4
Rhiaanon
LQ Newbie
 
Registered: Mar 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you so much!
 
Old 03-15-2007, 12:51 PM   #5
The GNUinator
Member
 
Registered: Oct 2006
Location: Fort Collins, CO
Distribution: Slackware 14.0, 14.1
Posts: 71

Rep: Reputation: 15
One way to set your hardware clock is with
a time server. The following code is named
'/usr/local/bin/setmytime'

setmytime is owned by root and must be
executable. As root you would type
chmod +x /usr/local/bin/setmytime

You must be connected to the
Internet for this to work.
You also must have the ntpdate
package installed. Type 'which ntpdate'
to verify that you have it.

Also, we might get a reply about
using a pool time server instead
of the specific server at 128.138.140.44
which is in Boulder, CO.

---cut here -----
#! /bin/sh
ntpdate 128.138.140.44 && hwclock --systohc
# end
---cut here ------

hth,
The GNUinator
 
Old 03-15-2007, 01:34 PM   #6
The GNUinator
Member
 
Registered: Oct 2006
Location: Fort Collins, CO
Distribution: Slackware 14.0, 14.1
Posts: 71

Rep: Reputation: 15
Re: Tried to set time with hwclock and entered something wrong!

Quote:
Now I have > for a prompt.
To see what your command prompt is
Code:
echo $PS1
I think a logout and relogin should fix that problem.


hth,
The GNUinator
 
Old 03-15-2007, 04:03 PM   #7
Rhiaanon
LQ Newbie
 
Registered: Mar 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by The GNUinator
To see what your command prompt is
Code:
echo $PS1
I think a logout and relogin should fix that problem.


hth,
The GNUinator
Thank you!
 
Old 05-21-2007, 02:05 PM   #8
lexwoodrum
LQ Newbie
 
Registered: Nov 2006
Location: Poughkeepsie NY USA
Distribution: centos 6.5, ubuntu 14.04.
Posts: 15

Rep: Reputation: 0
Quote:
Originally Posted by Rhiaanon
Hi All,

I typed the following:

hwclock --set --date="3/14/2007 "21:00:00"

One to many quotation marks. Now I have > for a prompt. Also, the system will not act on any command I enter. Please help! Thanks to all in advance.
Not only too many quote marks, but the format for the date
is --date="14 may 2007 21:00:00"

After that, use hwclock --hctosys
to save the time in the system clock.

lexwoodrum
 
Old 05-21-2007, 05:52 PM   #9
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 14.2 Solus
Posts: 2,264

Rep: Reputation: 51
You can manually use ntp to correct your time
ntpdate pool.ntp.org
 
  


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
date command counts time quicker than hwclock (RTC) carl0ski Linux - Software 2 12-29-2005 06:32 AM
my time is wrong and calender is also wrong Paxmaster Linux - General 6 12-16-2004 01:46 AM
hwclock on a laptop is not keeping time okmyx SUSE / openSUSE 1 12-01-2004 09:42 PM
Sys time and hwclock time hallamigo Mandriva 2 05-24-2004 10:57 PM
Setting System Time: kernel in wrong time zone warrenweiss Linux - General 7 05-15-2004 04:25 PM


All times are GMT -5. The time now is 05:02 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