bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Wildcard in combination of "-C" option


From: Alex Antener
Subject: Re: [Bug-tar] Wildcard in combination of "-C" option
Date: Mon, 12 Nov 2012 02:19:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2

Thanks!
I just wanted to get rid of the ~/foobar folder not to be included into
the archive, whereas the -C option does not make sense here. - Understood.

Have a good day, Sir

On 11/10/2012 09:52 PM, Sergey Poznyakoff wrote:
> Alex Antener <address@hidden> ha escrit:
>
>> ... which means, that the command
>>
>>> tar -C ~/foobar -czf foobar.tar.gz ~/foobar/*.sql
>> works.
> Sure it works, but there's no real sense in the -C option in this case.
>
>> Do I really have to
>>
>>> cd ~/foobar
> Not necessarily. The usual recipe is either
>
>  (cd ~/foobar; find -name '*.sql' -maxdepth 1 | tar czfT - -) > foobar.tar.gz
>
> or
>
>  find ~/foobar -name '*.sql' -maxdepth 1 -printf "%f\n" | \
>    tar CczfT ~/foobar foobar.tar.gz -
>  
> Regards,
> Sergey


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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