RSS

Tag Archive | "time"

Howto Add time And Date To Your Bash History

Wednesday, August 12, 2009

0 Comments

This comes in very handy if your trying to track back when you had last run something. To enable it just simply add export HISTTIMEFORMAT="%h/%d - %H:%M:%S " to your .bashrc file echo 'export HISTTIMEFORMAT="%h/%d - %H:%M:%S "' >> ~/.bashrc Then reload your .bashrc source ~/.bashrc Now when you run history you should get a output similar to the one [...]

Continue reading...

Creating aliases in bash

Saturday, May 23, 2009

0 Comments

Are you tired off typing out full commands? if so aliases can save you time. They allow you to shorten long commands down into one word. To add a alias edit ~/.bashrc nano ~/.bashrc Then come to the bottom of that file and add your aliases like this: alias rm = "rm -i" alias lightyrestart = "/etc/init.d/lighttpd restart" alias server_name="ssh [...]

Continue reading...