Table of Contents

 tail -f /directory/filename

This command is used to tail a file like a debug window and follow the output as it scrolls.

du -hc --max-depth=1

Using this command will give you the total Disk Usage for the folder you designate. Useful when trying to track down where precious is being utilized, and tearing down the tree to locate the culprit(s).

echo '' > /directory/filename

This command is used to clear all the text within a file. Useful when you are debugging a log file while starting and stopping an application.

netstat -tulpn

Common netstat command. L = listening, P = Programs, 

rsync -rv <src> <dest> --progress (Contributed by Brad Ellis)

This command will copy from one source folder to another, and give you not only the the throughput, but the % of progress of transfer over a network.

swapoff -a && swapon -a

Used to clear the memory locked up in swap when the physical memory is not 100% utilized. Also a good way to speed up a server acting sluggish and commit memory that should have been cleared.

dpkg-reconfigure gdm

Used to reconfigure the default Display Manager. Primarily used if changing between Gnome, KDE, or straight up Xwindows Display managers. 

tar -zcvf {.tgz-file} {files}

Compress files into tar gz format (replace z with j to compress to bunzip2)

/usr/sbin/sshd -p1234 -d

Used to debug SSH connections and negotiations. After the disconnect happens, the spawned process shuts down. 

SSH root access from a specific IP

Match Address 192.168.1.100
        PermitRootLogin yes