Quote:
Originally Posted by vdamgo
Thank you for the reply.
I have one command as below which will sum the file size in each folder, want to execute in 50 folders and get the size of all folders. instead of executing the command in each folder.
find . -type f -newer folder1 -not -newer folder2 -printf "%s\n" | awk '{sum += $0} END{print sum}'
|
not really sure from your description what you are after but heres my stab at it:
Code:
find . -type d | while read dir
do
find "$dir" -type f -newer "$dir"/folder1 -not -newer "$dir"/folder2 -printf "%s\n" | awk '{sum += $0} END{print sum}'
done