bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] How to specify the option for gzip used by tar?


From: Peng Yu
Subject: Re: [Bug-tar] How to specify the option for gzip used by tar?
Date: Wed, 6 Dec 2017 15:44:02 -0600

I am not sure how to use -l. But here is the test case. The -n option
does not seem to be effective. Otherwise, there should be no time in
the .gz file. But there still is.

Could anybody let me know what is the correct command is? Thanks.

$ cat main.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:

tmpdir=$(mktemp -d)
mkdir -p "$tmpdir"/dir
touch "$tmpdir"/dir/input1.txt
touch "$tmpdir"/dir/input2.txt
tar czvfl "$tmpdir"/file.tar.gz -C "$tmpdir" dir
set -v
file "$tmpdir"/file.tar.gz

$ ./main.sh
dir/
dir/input1.txt
dir/input2.txt
file "$tmpdir"/file.tar.gz
/var/folders/r7/bvmh1vvx41d63snvgbdz7bl40000gr/T/tmp.YGOcGLwrKR/file.tar.gz:
gzip compressed data, from Unix, last modified: Wed Dec  6 15:41:06
2017

On Wed, Dec 6, 2017 at 11:13 AM, Ralph Corderoy <address@hidden> wrote:
> Hi Peng,
>
>> GZIP=-n tar czf name.tar.gz name
>
> The -I option might help; give it gzip and its -n option.
>
> --
> Cheers, Ralph.
> https://plus.google.com/+RalphCorderoy



-- 
Regards,
Peng



reply via email to

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