Find folders with timestamp and disk space used

Hi,

I want write a script that finds a set of folders written between a certain time and then find the disk space used by those folders. Can someone please help.

Thanks,
Sparcman:(

# set the oldest to jan 01 2012
touch -t 201201010000  ./oldest
# set the newest jun 01 2012
touch -t 201201060000  ./newest

find /path/to/search   -type d \( -newer ./oldest -a ! -newer ./newest \) |
while read dir
do
   du -s $dir
done
1 Like