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: Sergey Poznyakoff
Subject: Re: [Bug-tar] Excluding directories based on content
Date: Sun, 19 Nov 2006 15:35:31 +0200

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.

> 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.

Regards,
Sergey




reply via email to

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