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 20:37:13 +0100
User-agent: nail 11.22 3/20/05

"Sergey Poznyakoff" <address@hidden> wrote:

> Joerg Schilling <address@hidden> wrote:
>
> > >   find . -type d -exec test -r {}/FILENAME \; -prune -o -print |
> > >      tar --no-recursion -cf archive.tar -T -
> > 
> > This does not work.....
>
> It works for me. -exec returns true or false regarding on whether
> FILENAME is present in the directory, and -prune makes find to not
> descend into that directory.

Then it seems that the program you call "find" is not strictly following the 
POSIX
standard and your command line depends on unspecified behavior of a specific
find implementation.

  
> > find . -type d -exec echo {}/FILENAME \;
> > 
> > will print a "{}/FILENAME" for each directory.
>
> The `echo' command has nothing to do with our question.

It seems that you did not understand the problem:

find expands "{}" only if an argument is containing only the two characters 
"{}".

echo allows you to check for the behavior of find.

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]