"Sergey Poznyakoff" <[EMAIL PROTECTED]> wrote:

> The following command will archive everything, except directories that
> contain file FILENAME:
>
>   find . -type d -exec test -r {}/FILENAME \; -prune -o -print |
>      tar --no-recursion -cf archive.tar -T -

This does not work.....

find . -type d -exec echo {}/FILENAME \;

will print a "{}/FILENAME" for each directory.

See:

http://www.opengroup.org/onlinepubs/009695399/utilities/find.html

-exec  utility_name  [argument ...] ; 
    -exec  utility_name  [argument ...]   {} + 
        The end of the primary expression shall be punctuated by a semicolon or 
        by a plus sign. Only a plus sign that
        follows an argument containing the two characters "{}" shall punctuate 
        the end of the primary expression.
        Other uses of the plus sign shall not be treated as special. 

        If the primary expression is punctuated by a semicolon, the utility 
        utility_name shall be invoked once for each
        pathname and the primary shall evaluate as true if the utility returns 
        a zero value as exit status. A
        utility_name or argument containing only the two characters "{}" shall 
        be replaced by the current
        pathname.

Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily


Reply via email to