Powered By

Powered by Blogger

Kamis, 11 Maret 2010

Make 'History' Show The Date For Each Command [Quick Linux Tip]

Vivek Gite @ Cyberciti has a really nice tip for the "history" command. Normally, running the command "history" in a terminal will give you an output which looks like this:

ubuntu linux history command output

Showing the exact date next to each command would be incredibly useful, don't you think? Have a look:

history with exact date linux

To achieve this, all you have to do is copy/paste the following commands in a terminal:
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc
source ~/.bashrc

Tidak ada komentar:

Posting Komentar