Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save supermasita/da2c43501287a13d03b8069f6a3ae3a2 to your computer and use it in GitHub Desktop.
Save supermasita/da2c43501287a13d03b8069f6a3ae3a2 to your computer and use it in GitHub Desktop.
FIND + AWK - Find files older than N days and sum their total disk use
# seen on http://www.liamdelahunty.com/tips/linux_ls_awk_totals.php
# gives result in MB
find /opt/kaltura/dwh/cycles/process/ -type f -mtime +3 -exec ls -l {} \; | awk '{ SUM += $5} END { print SUM/1024/1024 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment