mikesteven
asked on
file size
Hi,
How can I get the file size of all the files starting feb 2, 2011 up to feb 8, 2011?
Cheers!
How can I get the file size of all the files starting feb 2, 2011 up to feb 8, 2011?
Cheers!
as a sum of the file sizes or just display them?
Try this:
you might need to change the path to du (which du) to find it.
find . -maxdepth 1 -type f -newermt "2011-02-02 00:00" ! -newermt "2011-02-07 23:59" -exec /usr/bin/du -ch {} +
you might need to change the path to du (which du) to find it.
ASKER
yes please, as a sum
The sum is at the bottom of the output of the command I gave. It may not work if there are too many matching files though as it passes them all as arguments to du and you might run into the maximum command line length.
Remove the -maxdepth 1 if you want to look in subdirectories too.
Remove the -maxdepth 1 if you want to look in subdirectories too.
ASKER
Tomun, there's gonna be like 6,000 files matching will that work?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.