Originally published February 5, 2018 @ 5:53 pm
Every time a filesystem is running out of space and I need to find something to delete, I end up googling the syntax for the find command to make sure it stays off NFS and doesn’t cross mountpoints. Finally, I decided to write this basic script.
Here’s the script. And a few examples on how to use it:
# 20 largest files in /opt/tomcat large-files /opt/tomcat 20 # 12 largest files in each local filesystem large-files 12 # 10 largest files in each local filesystem large-files
Output fields:
DATE Current date/time HOST Short hostname KB File size in KB MTIME File modification time UID:GID User/Group RWX Permissions HL Number of hardlinks PATH File path/name
Experienced Unix/Linux System Administrator with 20-year background in Systems Analysis, Problem Resolution and Engineering Application Support in a large distributed Unix and Windows server environment. Strong problem determination skills. Good knowledge of networking, remote diagnostic techniques, firewalls and network security. Extensive experience with engineering application and database servers, high-availability systems, high-performance computing clusters, and process automation.