Advanced tar question

Lars Kellogg-Stedman lars at oddbit.com
Mon Mar 1 04:28:46 UTC 2004


In the first place, you can just pass --exclude multiple times, but 
this quickly grows tiresome.  There's a better way.

 From the command line, type:

   $ info tar

This will bring up the tar documentation.  Search for "exclude" (type 
'/exclude<return>').  You may have to repeat this step.  You'll find:

`--exclude-from=FILE'
`-X FILE'
      Similar to `--exclude', except `tar' will use the list of patterns
      in the file FILE.

I suspect this is what you want.

-- Lars

On Feb 29, 2004, at 5:53 PM, Charles Howse wrote:

> How can I pass a *list* of excluded *directories* to tar?  Would it be
> delimited by whitespace, comma, quoted or what?  I'll ultimately want 
> to
> create this list as a variable.





More information about the users mailing list