Archive for November, 2009

Shell tip: getting a canonical absolute path from a relative path

$ readlink -f relative/path

Gives a full path equivalent to the relative path, and follows every symlink in every component of the name in order to canonicalize it.

Comments

Useful aliases

alias top = htop

Htop is a top replacement, with colors, per-cpu load indicators, scrolling (specially horizontal scrolling so you can see the whole command line for each process), searching, a nicer interface to kill/renice processes, mouse support, and the ability to call strace/ltrace/lsof easily on the process you want.

alias info = pinfo
alias man  = pinfo -m

Pinfo is a lynx-style info and man browser. The main reason to use this, IMHO, is that GNU Info simply sucks as a browser. I’m not so sure about replacing man, as I’m confortable with less-style keybindings, but the ability to follow links to related manpages is a great feature :D

Both are included in all popular distros, so installation is only a matter of looking for the packages in the distro repositories.

Comments

This blog is protected by Dave\'s Spam Karma 2: 17770 Spams eaten and counting...