Код отслеживания Google Analytics.

Feb 4, 2012

Date, time zone, ubuntu

Well, it seems I need one more note for myself. It is about time utilities in Debian and Ubuntu.
Get time
print date and time
$ date
Sat Feb  4 18:23:23 EET 2012
alias with date can be usefull:
$ alias ts='date +%H%M%S_%d%m%Y'
$ tar cjf fileName$(ts).tar.bz2 ./
will start to pack into something like fileName_182536_04022012.tar.bz2
Change time
change time zone can be done by
$ sudo dpkg-reconfigure tzdata
change time can be done by
$sudo date --set "19:02"
but better to use ntpdate or ntpd (see Time Synchronisation with NTP)
more information about time routines can be found here - UbuntuTime

No comments: