How to find total MB of a directory plus all subdirectories

Mike McCarty Mike.McCarty at sbcglobal.net
Fri Mar 9 00:04:20 UTC 2007


Nigel Henry wrote:
> Thanks Bruno. I'll have another go in man bash, and see if I can learn a bit 
> more.

It's odd to me that none suggested sorting to find the largest etc.

When I'm pruning, I usually use this...

$ du -s /path/to/directories/* | sort -gr | head

This gives me the largest several entries.

Often, this is a repeated procedure, and the output
all gets catenated (IOW, I use ">>") and edited
into place, so I know where stuff is.

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the fedora-list mailing list