Changing date in Linux is very simple, we can you use "date" command with date specified in particular format. we can do this in two ways.
1. using "date --set" or "date -s" command.
date --set "8 April 2008 20:42:45"
or
date -s "7 April 2008 20:42:45"
2. simply "date MMDDhhmmYYYY.ss" command.
date 070821442012.34
Format: "MM DD hh mm YYYY ss" stands for
MM = month = 07
DD = day = 08
hh = hour = 21
mm = minute = 44
YYYY = year = 2012
ss = second = 34
No comments:
Post a Comment