[comp.binaries.ibm.pc.d] files by size

joec@Morgan.COM (Joe Collins) (10/18/89)

Does anyone know of a program which would scan your hard disk, floppy, etc
and sort ALL files by size, data, etc?
Sample usage might be:

 MYPROG c: -size -2    (sort by size, show 2 biggest)

C:\Command.com     23210
C:\data\c.source   19100

Why? If I have a harddisk which is getting crammed, I would
want to know which are the biggest files for erasing or
crunching down, etc.

Thanks,

joec@morgan.com

kiy@pte.UUCP (Kevin Young) (10/19/89)

In article <451@ringwood.Morgan.COM> joec@Morgan.COM (Joe Collins) writes:
>Does anyone know of a program which would scan your hard disk, floppy, etc
>and sort ALL files by size, data, etc? ...
>
>joec@morgan.com

If you have the MKS Toolkit (which I highly recommend), you can use the
find command.  A line something like:

	find c: -size +200 -print

will give you all files > 200 blocks (1 block = 512 bytes).  You could also
mix in the ls (directory list command) with the -s option:

	find c: -exec ls -s {} ; | sort

which would give you the block size followed by the file name for all files
sorted by ascending block size.  Hope this helps!

Kevin
-- 
>|< Kevin I Young					uunet!edsews!pte!kiy
    Precise Technology & Electronics, Inc.
    Custom Automated Test and Measurement Equipment for Industry
    Old Saying: "If you can't do it in real time, then don't do it at all" - me

fredex@cg-atla.UUCP (Fred Smith) (11/14/89)

In article <3004@pte.UUCP> kiy@pte.UUCP (Kevin Young) writes:
>In article <451@ringwood.Morgan.COM> joec@Morgan.COM (Joe Collins) writes:
>>Does anyone know of a program which would scan your hard disk, floppy, etc
>>and sort ALL files by size, data, etc? ...
>
>If you have the MKS Toolkit (which I highly recommend), you can use the
>find command.  

There is also a version of find which was written by Russ Nelson (of Clarkson
fame). I haven't seen it here on the net and haven't noticed it in the
grape archives at Clarkson (haven't looked very hard!), but I found it
kicking around on a local BBS system a couple of years ago. I had
been looking for a unix-like find, and was glad I found it!

Fred