Home
> Uncategorized > Napkin notes
Napkin notes
Find disk capacity used by files older than a given date:
find . -type f -atime +30 -print0 2>/dev/null| du -hc --files0-from - | \ tail -n 1
And wrap it in a loop to show capacity by various dates:
for a in 30 90 180 365 730 1460 11680; do \ echo -n "Files older than $a days = "; \ find . -type f -atime +$a -print0 2>/dev/null| \ du -hc --files0-from - | tail -n 1; done
Categories: Uncategorized
Comments (0)
Trackbacks (0)
Leave a comment
Trackback