On Wed, 13 Feb 2002 08:13:59 -0500 "Ronald J. Hall" <[EMAIL PROTECTED]> wrote:
> du -h /usr > /home/darklord/usr-filesize.txt > > Now, I've got a huge (300k) text file, which is better but what I want to do> is filter or narrow the search down to filesizes of say, 512k or 1 meg or> bigger...can I do this with "du" or would I have to use something like grep? how about du -h /usr | grep [0-9]M this will show you all directories larger than 1 MB (but smaller than 1GB) or you can issue du -h /usr | grep [0-9][0-9]M this will show you all directories larger than 9 MB and du -h /usr | grep [0-9][0-9][0-9] for larger than 99MB etc. if you want only directories between 9MB and 99MB do this du -h /usr | grep [0-9][0-9]M | grep -v [0-9][0-9][0-9]M a useful du option is du --max-depth=0 /usr this will only list directories directly branching from /usr like /usr/share, /usr/bin and /usr/lib cheers, Alaa
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com