I will be updating this entry with commands that I have come to use throughout my system administration and engineering work. I hope that it is of some use to readers who stumble on this site. 

  1. Watch for changes in active and inactive connections in the Linux Virtual Server kernel table
    watch -n 5 "ipvsadm -L -n"
  2. List the types and amount of TCP states in the linux networking subsytem
    netstat -tan |awk '{print $6}'|perl -ne 'chomp; $a{$_}++; END { print map({ "$_:$a{$_}\n" } sort keys %a); }'
  3. List the SYN_RECV state per IP address
    netstat -tan |grep SYN_RECV |awk -F '[ :][ :]*' '{print $6}' | perl -ne 'chomp; $a{$_}++; END { print map({ "$_: $a{$_}\n" } sort key
    s %a); }'

  4. CHMOD all of the files (not directories) in a directory
    find . -type f -exec chmod a+r \{\} \;
  5. CHMOD all of the directories (not files) in a directory
    find . -type d -exec chmod a+rx \{\} \;
  6. Find the largest file in the filesystem excluding NFS mounted shares
    find / -fstype nfs -o -type f -ls | sort +6n -r | less

  7. Find the largest files in the filesystem
    find / -xdev -type f -ls | sort +6n -r | less
  8. Remove the CVS directories that populate a source directory
    find ./ -name CVS -type d -exec rm -fr {} \; -- find ./ -name .cvsignore -exec rm -f {} \;