Some useful sysadmin commands
Some useful sysadmin commands:
- Show the disk usage per directory one level:
FreeBSD: du -h -d 1 Linux: du -h --max-depth=1
- How to create a Symlink/Softlink?
ln -s realpath fakepath
- Emptying a file without deleting it:(i.e. quick way to empty system logs)
cp /dev/null filename
- 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
- 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
- Watching logs:
tail -f /path/to/log-file