Skip to content

Instantly share code, notes, and snippets.

@pottsga
Last active April 9, 2020 12:00
Show Gist options
  • Save pottsga/74eb874914884cd4b5d1d5e093d5d657 to your computer and use it in GitHub Desktop.
Save pottsga/74eb874914884cd4b5d1d5e093d5d657 to your computer and use it in GitHub Desktop.

Find Large Files

du -a -h | sort -h -r | head -n 20

Find Files By Date

Find and Remove

find /var/log/tomcat -type f -mtime +TIMEFRAME -exec rm -f {} ; # example timeframe, 14 for 2 weeks

Find and Print

find /var/log/tomcat -type f -mtime +TIMEFRAME -print

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment