[SLUG] Re:Re:Re:Largest File

Al Girling al at gcguk.demon.co.uk
Wed Mar 22 14:32:06 GMT 2006


On Wed, Mar 22, 2006 at 11:37:43AM GMT, Bob Garrood wrote:
> Hi
> 
> The odd effects were the way using the -h option seems to give 2 lists , one 
> for k and one for m.

Hmm, absolutely true.  When I posted my message I'd tested my method on
a directory whose sub-directories contact files no larger than a Mb.

>                       The '"' was just part of the e-mail.

Fair enough.

> How about :
> 
> ls -Slh <path to directory>

I've seen your follow-up post to this but the same still applies.  Any
use of 'ls' means searching again through the results to determine the
largest file.  I think your method with 'du' is the best solution so
far.  It still means searching past the directories, but you can quickly
find your largest file.

I've tried Jamie's bash script, but it complains of an unexpected token
and I don't know enough of bash scripting to make it work. :(

You'd think this would be a simple thing to do, but I can't think how.

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/ea966071/attachment.bin


More information about the Scarborough mailing list