Some useful sysadmin commands

Posted on the September 8th, 2008 under Cheat Sheets,Server Admin Tips by Stephen

Some useful sysadmin commands:

  1. Show the disk usage per directory one level:
    FreeBSD: du -h -d 1
    Linux: du -h --max-depth=1
  2. How to create a Symlink/Softlink?
    ln -s realpath fakepath
  3. Emptying a file without deleting it:(i.e. quick way to empty system logs)
    cp /dev/null filename
  4. This command will show exim processes including the path to the script being utilized to send mail. Very useful in locating a spamming script.
    ps -C exim -fH eww
  5. To trace through the hops the email gets delivered. This is useful to determine if the message can reach its destination or not.
    exim -bt username@domain.com
  6. Watching logs:
    tail -f /path/to/log-file

Share this page:
  • Facebook
  • Twitter
  • StumbleUpon
  • Slashdot
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Live
  • MySpace
  • Technorati
  • LinkedIn
  • Reddit
Related Posts:
  1. Exim Cheatsheet
  2. Mail sending problem
  3. Useful Yum Commands

Leave a Comment