Re: How to delete all files with a file size lower equal 210 bytes?

From: Bev A. Kupf (bevakupf_at_myhome.net)
Date: 03/17/05


Date: Thu, 17 Mar 2005 17:50:48 GMT

On Thu, 17 Mar 2005 17:48:15 GMT,
    Bev A. Kupf (bevakupf@myhome.net) wrote:
> On Thu, 17 Mar 2005 18:02:41 +0100,
> Matthias Zach (zach228@fortuencity.com) wrote:
>> I want to delete all files in a certain directory (say /var/users/karl )
>> which have a file size lower equal 210 bytes.
>>
>> How do I do this in a shell script (with one command)?
>
> Since you've posted this to comp.os.linux.misc, you presumably
> have GNU find. If that's the case, you should be able to use
> something like:
>
> `find . -size -211c -exec rm {} \;`

Oops, make that: `find /var/users/karl -size -211c -exec rm {} \;`

> or some variant thereof.
>
> Beverly

-- 
Many a smale maketh a grate -- Geoffrey Chaucer


Relevant Pages