[SLUG] Re:Re:Re:Largest File

Al Girling al at gcguk.demon.co.uk
Wed Mar 22 17:05:19 GMT 2006


On Wed, Mar 22, 2006 at 02:42:48PM GMT, Jamie Adams wrote:
> I think it is because one of the lines wrapped - I have numbered the
> lines now:
> 
> 1: cd /home/adamsj
> 
> 2: for line in ` du -a -b 2>/dev/null| sort -g -r |head -n 200| sed
> s/^[0-9]*s*//g`
> 
> 4: do
> 
> 3: if [ -f $line ]; then
> 4:    echo `du -h $line`
> 
> 5: fi
> 
> 6: done
> 
> Seems to work for me.. I get an output like this:

Yep!  This gets my vote as the best method on offer now.

Excellent!

Toodle pip,

Al

-- 
Al Girling

Home page:                  <http://al.sdf-eu.org>
Linux User: #290080         <http://counter.li.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.lug.org.uk/pipermail/scarborough/attachments/20060322/48ac3958/attachment.bin


More information about the Scarborough mailing list