ponedjeljak, 20. listopada 2014.

Solved: How to set date and time in Linux

Dear diary,
today I wondered how to set the system date and time in a Linux environment? I have not tried asking Google because I don't want him to think I am stupid.



Dear "I don't know who you are",
I took the liberty of Googling that for you, and the answer is quite simple. Consider the following:

Let's say you want to set the date to January 7th, 2014. Simply use
date +%Y%m%d –s „20140107“
and you are set.

On the other hand, if you want to set the time to 15:52:39 the command
date +%T –s „15:52:39“
will probably prove useful.

Please don't ask me how to set the date to February 17th 2014. If you can't extrapolate from incomplete data...

Nema komentara:

Objavi komentar