[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] How to exclude multiple patterns?
From: |
Peng Yu |
Subject: |
Re: [Bug-tar] How to exclude multiple patterns? |
Date: |
Mon, 5 Jul 2010 16:49:58 -0500 |
On Mon, Jul 5, 2010 at 4:43 PM, Bruce Dubbs <address@hidden> wrote:
> Peng Yu wrote:
>>
>> Hi,
>>
>> I use the following option to exclude multiple patterns. But it seems
>> that it is not working. Would you please let me know what is the
>> correct way to exclude multiple patterns?
>>
>> --exclude={*.o,.*.sw?,.*.d}
I'm pretty sure that I can collapse multiple exclude patterns into one
in a previous version of tar. Did tar get changed in the last a few
years on this aspect?
> You have two problems. The shell is interpreting the wildcards, you have to
> escape them. Second, you must use use shell syntax, or globbing, rather
> than `regexp' syntax. You need something like:
>
> --exclude='*.o' --exclude='.*.sw?' --exclude='*.d'
>
> See tar info "Problems with Using the `exclude' Options"
>
> -- Bruce
>
--
Regards,
Peng