On Wed, 29 Aug 2001, Jacob Meuser wrote:
> On Wed, Aug 29, 2001 at 09:51:05PM -0700, Mike Smith wrote:
> > I need the command to search for files greater than a given size. Who know how to 
>do this on a Red Hat system.
> > 
> I don't know about RedHat in particular, but perhaps
> % man find
> could be the info you're looking for.  Probably something like
> % find / -size <size> 
> 
> find is neat!

Indeed.

To find (for example) files of 100 (512-byte) blocks or bigger,

     find / -size +100 -print

If you want to use units other than 512-byte blocks, you can put a suffix
on the number:  b=blocks, c=chars, w=(2-byte) words, k=kilobytes.

To find files SMALLER than 100 blocks, say "-100" instead of "+100".  To find
files of exactly 100 blocks, say "100" without a + or -.

The above example starts in your root directory, and searches every file on
every mounted drive.  To start under some other directory, replace the "/"
with the name of the starting directory.

The GNU version of find (used on Linux) doesn't really need the "-print" at
the end, since that's the default action if no other action is specified.
But some other versions won't print anything unless you say "-print".

               - Neil Parker, [EMAIL PROTECTED]

Reply via email to