> Please share your cool and useful commands.
i guess i have many favorites defined via my .bashrc, here's one:
tl foo #show output of "type", "ls", and show what package defines "foo"
which derives from various definitions via .bashrc:
alias Lc.=' ls -aFq --color'
Lu.(){ Lc. -l "${timestyle=$(ls --time-style -d / 1>/dev/null 2>/dev/null&&echo --time-style="+%F %a %T"||echo --full-time)}" "$@";}
alias lu.=' Lu. -v'
alias Lu=' Lu. -d'
alias lT.=' lu. -t'
alias lt.=' lT. -r'
alias Lt.=' lt. -c'
alias lt=' lt. -d'
alias Lt=' Lt. -d'
tl()(tp=$(type -p "$@");if [ "$tp" ];then
lt $tp&& #show file mod time
Lt $tp|| tp=$@ #show inode mod time
type -a "$@" #better than "which"
rqf $tp #show what package
else
type "$@"
fi)
if type rpm>/dev/null 2>&1;then
alias rqf=' rpm -qf'
elif type dpkg>/dev/null 2>&1;then
rqf()(p=$(dpkg -S "$@");[ "$p" ]&&dpkg-query -W ${p%%:*})
fi