Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Detailed Articles

Page Tree
root@self

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
languagebash
du -sh * | sort

Long Running Processes

Look for long running processes,

Warning

To write.

Other Useful Commands

MD5

Check if a file is corrupt,

Code Block
languagebash
# 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.

Integrity Checking

MD5

Check if a file is corrupt,

Code Block
languagebash
# On Ubuntu
md5sum /path/to/file

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