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: Dr. David Alan Gilbert
Subject: Re: [Bug-tar] Excluding directories based on content
Date: Sun, 19 Nov 2006 14:03:54 +0000
User-agent: Mutt/1.5.9i

* Sergey Poznyakoff (address@hidden) wrote:
> Dr. David Alan Gilbert <address@hidden> wrote:
> 
> > I can see that would be needed if regexp was done, but for just fixed
> > exclude names it could be implemented at the moment in the same way
> > that cache dir exclusion is done.
> 
> Yes, it is reasonable.  Allow me some time to implement this.

Thanks! I'd be happy to help or write the code myself.

> > I can't immediately see how to do this with a find expression since I
> > can't see how to test for the existance of a file within the directory
> > (if the current filename passed to the find parser is the directory).
> 
> 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 -
>      
> Extending it to cover two or three file names is not difficult.

Interesting - I'll give that a go, I'm not sure how much the exec's
of test will cost; (I guess the easiest way for the 2 markers I need
is to add it as a -o within the test for the other name).

Dave

-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    | Running GNU/Linux on Alpha,68K| Happy  \ 
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/




reply via email to

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