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.
Code Block |
---|
|
du -sh * | sort |
Long Running Processes
Look for long running processes,
Other Useful Commands
MD5
Check if a file is corrupt,
Code Block |
---|
|
# On Ubuntu
md5sum /path/to/file
# On Solaris
digest -a md5 -v /path/to/file |
Information
Last
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,
Code Block |
---|
|
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
MD5
Check if a file is corrupt,
Code Block |
---|
|
# On Ubuntu
md5sum /path/to/file
# On Solaris
digest -a md5 -v /path/to/file |