in reply to How much disk space would be freed?
Not exactly the same because find rounds mtimes. I wish importing stuff didn't take so many characters :-)use File::Find::Rule 'rule'; use File::stat; use List::Util 'sum'; print sum( map {stat($_)->size} rule->file->name(qr/log/i) ->mtime("<".(time-30*24*60*60)) ->in("/opt/app/logs") ), "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How much disk space would be freed?
by reisinge (Hermit) on Feb 22, 2017 at 12:55 UTC |