Re: [Bug-tar] How to supply the -n option to gzip when calling tar with 'czf'?

2013-09-09 Thread Sergey Poznyakoff
Peng Yu  ha escrit:

> I don't see how to supply the -n option to gzip when calling tar with
> 'czf'. Does anybody know if there is a way to do so?

Use the GZIP environment variable, e.g.:

  GZIP=-n tar cfz file.tar.gz .

Regards,
Sergey




Re: [Bug-tar] How to supply the -n option to gzip when calling tar with 'czf'?

2013-09-09 Thread Eric Blake
On 09/09/2013 03:39 PM, Peng Yu wrote:
> Hi,
> 
> I don't see how to supply the -n option to gzip when calling tar with
> 'czf'. Does anybody know if there is a way to do so?

Why?  Why not just use 'tar cf ... | gzip -cn ...'?  Remember, 'tar czf'
is only a shortcut for a commonly used setup, but if you need something
that isn't as common, then use longhand instead of the shortcut.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


[Bug-tar] How to supply the -n option to gzip when calling tar with 'czf'?

2013-09-09 Thread Peng Yu
Hi,

I don't see how to supply the -n option to gzip when calling tar with
'czf'. Does anybody know if there is a way to do so?

-- 
Regards,
Peng