Print

Add Date & Time to the history command

Have you ever caught yourself wondering when you, or someone else, typed a Linux command on your server?

Add this to your env and keep track of the dates and times

export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S - "

You can do this with any editor for example

# vi .bash_profile

You will get a nice little output like this.

# history
1006  2010-09-29 21:42:13 - ls -la
1007  2010-09-29 21:42:17 - pwd
1008  2010-09-29 21:42:19 - sudo su -
1009  2010-09-29 21:42:30 - history

Works with Ubuntu 10.04.

Get Crucial Ballistix Memory High-Performance Memory.

 
Joomla SEO powered by JoomSEF