bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Excluding directories based on content


From: Joerg Schilling
Subject: Re: [Bug-tar] Excluding directories based on content
Date: Sun, 19 Nov 2006 17:23:18 +0100
User-agent: nail 11.22 3/20/05

"Sergey Poznyakoff" <address@hidden> 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:address@hidden (home) Jörg Schilling D-13353 Berlin
       address@hidden                (uni)  
       address@hidden     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily




reply via email to

[Prev in Thread] Current Thread [Next in Thread]