On Fri, May 28, 1999 at 04:17:06PM -0600, Robert Giles wrote:

| Hi folks - I'm trying to create a tar of a directory tree,
| excluding all files with a *.bz2 extension.  I've tried "--exclude *.bz2"
| and "-X exclude-file" (where exclude-file contains "*.bz2").  Any quick
| way to accomplish this?

The --exclude option is only found in GNU tar, but that's what Linux
uses, so you're in luck!

What you're looking for is :

   --exclude=\*.bz2

The = is needed, and the * must be quoted or else the shell will try
to expand it, which is probably not what you want.

If you have multiple things to exclude, you can put multiple --exclude
directives in there, or use the --exclude-from=FILE syntax.

-- 
Doug McLaren, [EMAIL PROTECTED]
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]

Reply via email to