0 like 0 dislike
52 views
asked May 27, 2014 in Education & Reference by Yogi (180 points) | 52 views
    

1 Answer

0 like 0 dislike

Linux Set Date Command Example

Use the following syntax to set new data and time:

date --set="STRING"

For example, set new data to 2 Oct 2006 18:00:00, type the following command as root user:

date -s "18 MAY 2014 11:20:00"

OR

date --set="18 MAY 2014 11:20:00"

You can also simplify format using following syntax:

date +%Y%m%d -s "20140618"

Linux Set Time Examples

To set time use the following syntax:

date +%T -s "11:23:13"

To set the Hardware Clock to the current System Time please use the below command

Use the following syntax:

hwclock --systohc

Linux Display Current Data and Time

Just type the date command:
$ date

Sample outputs:

Wed Apr 23 10:32:59 CDT 2014

Linux Display The Hardware Clock (RTC)

Type the following hwclock command to read the Hardware Clock and display the time on screen:

hwclock -r

OR

hwclock --show

answered May 27, 2014 by Sam (1,380 points)

Related questions

0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

Mathe Forum Schule und Studenten
1,164 questions
1,304 answers
275 comments
1,589 users