Set Ubuntu Server Time through Terminal

Get the current server time by just typing “date” in the terminal.

Install Time Zone
1 $sudo aptitude install tzdata
2 $dpkg-reconfigure tzdata
3 $sudo vim /etc/ntp.conf

Add NTP server
1 driftfile /var/lib/ntp/ntp.drift
2 server 0.pool.ntp.org
3 server 1.pool.ntp.org
4 server 2.pool.ntp.org
5 server pool.ntp.org

Manually update the time by “$sudo ntpdate pool.ntp.org”

Automated Shutdown via Terminal

Automated shutdown is pretty useful for lots of things. If you’re downloading something and you want the computer to shut down after you’ve finished to save power or if you’re going to sleep and you want to leave the computer on to play some music but really can’t be bothered getting up.

There are program to schedule shutdowns, but here’s a great simple command line prompt alternative:

sudo shutdown -P time

and replace “time” with the number of minutes or time stamp. If you replace it with an integer (e.g. 30) it will count down from that number of minutes then initiate shutdown. e.g. [sudo shutdown -P 30] would shutdown the computer in 30 minutes. If you replace “time” with a time stamp (e.g. 13:30), it would initiate shutdown at that specific time. e.g.[sudo shutdown -P 13:30] would shutdown the computer at 1:30pm. Not that the time is in 24 hour format.

Check out “man shutdown” for more information.

Log4Tailer 2.0 released with SSH tailing capabilities

Log4Tailer 2.0 http://code.google.com/p/log4tailer/ has just been released. It has been a month of some thought and testing the feasability of including tailing over SSH, and this release provides just that. It will open the door for a range of more features to control remote logs scattered across a network from a single terminal, instead of having multiple terminals or windows opened. As always, the project provides a nice pdf UserGuide explaining the ssh tailing capabilities of log4tailer.