Page tree
Skip to end of metadata
Go to start of metadata

Detailed Articles

Useful One Off Recipes

Disk Management

List directories from largest to smallest at the top level only. On older system h will not work and you must use k.

du -sh * | sort

Long Running Processes

Look for long running processes,

To write.



Last searches back through the file /var/log/wtmp  (or the file designated by the -f flag) and displays a list of all users logged in (and out) since that file was created. 


Lastb is the same as last, except that by default it shows a log of the file /var/log/btmp, which contains all the bad login attempts.

Quck String Manipulation

Quick reference of manipulating standout,

echo "some_file_name.txt" | tr "_" " " # result will be "some file name.txt"
paste oldName.txt newName.txt > runMe.txt # connects line by line to contents of both files together


Integrity Checking


Check if a file is corrupt,

# On Ubuntu
md5sum /path/to/file

# On Solaris
digest -a md5 -v /path/to/file