Setting date in Linux

You need to have root access on your system t perform this operation.

date +%Y%m%d -s “20090502″

To set the time in Linux, enter

date +%T -s “11:14:00″

There are other ways too :

date -s “2 MAY 2009 11:14:00″ OR date 05021118

The format is date MMDDhhmm

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s