This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: find: missing argument to -exec
- To: "Stein M. Eliassen" <steinme at kpnqwest dot no>
- Subject: RE: find: missing argument to -exec
- From: "Kevin Wright" <kevin at wright dot org>
- Date: Thu, 15 Mar 2001 15:15:46 -0800
- Cc: "Cygwin-Mailing-List" <cygwin at cygwin dot com>
Stein,
How about:
$ find . -mtime 1 |xargs rm
from the find man page:
-exec command ;
Execute command; true if 0 status is returned. All
following arguments to find are taken to be argu-
ments 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.
It seems that you need the \ next to the ; thus:
find . -mtime 1 -exec rm {} \;
At least that worked for me. YMMV
--Kevin
> -----Original Message-----
> From: cygwin-owner@sources.redhat.com
> [mailto:cygwin-owner@sources.redhat.com]On Behalf Of Stein M. Eliassen
> Sent: Thursday, March 15, 2001 2:28 PM
> To: cygwin@cygwin.com
> Subject: find: missing argument to -exec
>
>
> Hi,
>
> When trying:
> find . -mtime 1 -exec rm {}\ ;
>
> I'm receiving 'find: missing argument to -exec', I've tried
> several variants
> too.
>
> Even searched the archives and found some post's regarding the
> subject, but I'm
> still not able to solve it.
>
> Someone knows what's the problem here?
>
> On another note, it's something wrong with my cygwin-setup since the 'alt
> gr'-key doesn't work in the cygwin-shell, but everything is correct from
> cmd.exe.
>
> How do I handle that?
>
> Cygwin version installed is 1.1.8 on NT4 SP6.
>
>
> Regards
> Stein
>
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
>
>
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple