How to show date and time in your ubuntu bash history
This post was written by admin on October 4, 2009
Posted Under: General
Posted Under: General
This is useful tip if there are multiple people maintaining a given server (so you can see when a command was performed) or even if you are the maintainer, but can’t remember exactly when you did or changed something.
First,edit $HOME/.bashrc file by this command:
gedit $HOME/.bashrc
Add this line into the file,save and close it.
export HISTTIMEFORMAT="%h/%d - %H:%M:%S "
Logout and back in,and you will get history with date and time like this:
1002 May/09 – 11:46:16 grep log /var/log/maillog 1003 Apr/09 – 14:17:40 passwd test 1004 Apr/09 – 14:50:28 history 15
Related posts:
- Show Weather and Set Date/Time in Ubuntu Clock panel applet
- How to Clear Login History and Command History in Ubuntu Linux
- Remove the History for website just visited in Firefox
- How to Clear and Disable Totem’s recent history in Ubuntu 11.04 Unity
- How to get colors in man command page
Tags: tips
