On Saturday 27 Sep 2003 12:14 pm, Anarky wrote:
> Richard Urwin wrote:
> >On Saturday 27 Sep 2003 11:10 am, Anarky wrote:
> >>    any way to give some kind of command to delete all files smaller
> >>than a specified size in a certain path recursivelly?
> >
> >A quick "man find" shows that find can do the job. I wouldn't like to give
> > you the exact command as I haven't used it yet.
>
> ok, so with this I can find them .. but how do I then delete them?

from man find:
   ACTIONS
       -exec command ;
              Execute  command;  true  if 0 status is returned.  All following
              arguments to find are taken to be arguments to the command until
              an  argument  consisting of `;' is encountered.  The string `{}'
              is replaced by the current file name being processed  everywhere
              it occurs in the arguments to the command, not just in arguments
              where it is alone, as in some versions of find.  Both  of  these
              constructions might need to be escaped (with a `\') or quoted to
              protect them from expansion by the shell.  The command  is  exe-
              cuted in the starting directory.

So your find command might include
    -exec rm \{\} \;
If it were me I'd try
    -exec echo \{\} \;
first.
-- 
Richard Urwin

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to