Thursday, March 1, 2007

UNIX/Linux - Command Line Tips

du -hs dirDisplays disk usage of dir. -h gives human readable format (e.g. 12M) and -s suppresses every recursive directory's output
echo $?Displays the return code of the previously exited program
pgrep -lf process_nameDisplays pid of all running processes named process_name. -l lists the process name and -f matches in the full command line

No comments: