Scripts and commands

Linux command line: Find the total size of all files not changed since a specified number of days

Find all files not changed in the last 13 days

# cd /your/path
# find . -type f -mtime +13 -exec ls -l {} +  | awk 'BEGIN { sum=0; filescount=0 } { sum += $5; filescount+=1} END { print "Total:",sum,"bytes in",filescount,"files." }'
Total: 20072723456 bytes in 86 files.

Linux command line: Find all files modified since a specified number of days until now


Find all files canged in the last 13 days

# find . -type f -mtime -13 -exec ls -l {} +  | awk 'BEGIN { sum=0; filescount=0 } { sum += $5; filescount+=1} END { print "Total:",sum,"bytes in",filescount,"files." }'
Total: 22556903 bytes in 26 files.

Subpages (1): setfacl utility wrapper
Comments