It was thus said that the Great Liam Proven once stated:
On 13 December 2011 05:22, Sean Conner <spc at
conman.org> wrote:
It was thus said that the Great Liam Proven once
stated:
On 12 December 2011 22:43, Mouse <mouse at
rodents-montreal.org> wrote:
> There are certain commands I've come
across that handles extentions
> poorly. ?Like gunzip:
> [spc]lucy:/tmp>mv x-grey.tar.gz x-grey.tar.foo
> [spc]lucy:/tmp>gunzip x-grey.tar.foo
> gunzip: x-grey.tar.foo: unknown suffix -- ignored
> [spc]lucy:/tmp>
Yes. ?Annoying, but understandable - without the .gz on there, how is
it to know what file to put the result in?
*Shudder*
Your acceptable peculiarity is my hated misfeature.
?gunzip will create a file based on the filename but without the ".gz"
extension. ?There are only a few choices I see for gunzip handing this:
What I expect, want and demand:
It unpacks to the name(s) of the file(s) [and folders] in the archive
and leaves the original archive the fsck alone.
In my early Linux days, I was /very/ annoyed several times when Gunzip
cheerfully *removed the archive I told it to unpack*. This is
*absolutely* unacceptable to my mind.
gzip (and gunzip) does not make an archive; it just compresses
(decompresses) a given file and that's all it does. Given some files (and
this is a Color Computer simulator I'm working with here that was mentioned
in another recent thread):
[spc]lucy:/tmp/coco/src>ll
total 604
-rw-r--r-- 1 spc spc 48079 Oct 30 2001 6809.asm
-rw-r--r-- 1 spc spc 418 Oct 29 2001 build5.bat
-rw-r--r-- 1 spc spc 347 Oct 29 2001 build6.bat
-rw-r--r-- 1 spc spc 7834 Oct 29 2001 cas2rom.asm
-rw-r--r-- 1 spc spc 16350 Oct 29 2001 casin.asm
-rw-r--r-- 1 spc spc 18878 Oct 29 2001 casout.asm
-rw-r--r-- 1 spc spc 161718 Oct 29 2001 coco.asm
-rw-r--r-- 1 spc spc 14983 Oct 29 2001 disk.asm
-rw-r--r-- 1 spc spc 10003 Oct 29 2001 dskini.asm
-rw-r--r-- 1 spc spc 35476 Oct 29 2001 hardware.asm
-rw-r--r-- 1 spc spc 16514 Oct 29 2001 keyboard.asm
-rw-r--r-- 1 spc spc 16982 Oct 29 2001 keydata.asm
-rw-r--r-- 1 spc spc 76297 Oct 29 2001 port.asm
-rw-r--r-- 1 spc spc 14296 Oct 29 2001 portmask.asm
-rw-r--r-- 1 spc spc 1389 Oct 30 2001 readme.txt
-rw-r--r-- 1 spc spc 9503 Oct 29 2001 retrieve.asm
-rw-r--r-- 1 spc spc 94834 Oct 29 2001 stack.asm
drwxr-xr-x 2 spc spc 4096 Oct 28 2001 ver13rd
-rw-r--r-- 1 spc spc 18313 Oct 29 2001 vgacheck.asm
[spc]lucy:/tmp/coco/src>gzip *.asm
[spc]lucy:/tmp/coco/src>ll
total 156
-rw-r--r-- 1 spc spc 8128 Oct 30 2001 6809.asm.gz
-rw-r--r-- 1 spc spc 418 Oct 29 2001 build5.bat
-rw-r--r-- 1 spc spc 347 Oct 29 2001 build6.bat
-rw-r--r-- 1 spc spc 2328 Oct 29 2001 cas2rom.asm.gz
-rw-r--r-- 1 spc spc 4958 Oct 29 2001 casin.asm.gz
-rw-r--r-- 1 spc spc 5656 Oct 29 2001 casout.asm.gz
-rw-r--r-- 1 spc spc 37158 Oct 29 2001 coco.asm.gz
-rw-r--r-- 1 spc spc 3380 Oct 29 2001 disk.asm.gz
-rw-r--r-- 1 spc spc 3157 Oct 29 2001 dskini.asm.gz
-rw-r--r-- 1 spc spc 8513 Oct 29 2001 hardware.asm.gz
-rw-r--r-- 1 spc spc 3912 Oct 29 2001 keyboard.asm.gz
-rw-r--r-- 1 spc spc 2555 Oct 29 2001 keydata.asm.gz
-rw-r--r-- 1 spc spc 17986 Oct 29 2001 port.asm.gz
-rw-r--r-- 1 spc spc 1341 Oct 29 2001 portmask.asm.gz
-rw-r--r-- 1 spc spc 1389 Oct 30 2001 readme.txt
-rw-r--r-- 1 spc spc 2929 Oct 29 2001 retrieve.asm.gz
-rw-r--r-- 1 spc spc 8061 Oct 29 2001 stack.asm.gz
drwxr-xr-x 2 spc spc 4096 Oct 28 2001 ver13rd
-rw-r--r-- 1 spc spc 4348 Oct 29 2001 vgacheck.asm.gz
[spc]lucy:/tmp/coco/src>gunzip *.gz
[spc]lucy:/tmp/coco/src>ll
total 604
-rw-r--r-- 1 spc spc 48079 Oct 30 2001 6809.asm
-rw-r--r-- 1 spc spc 418 Oct 29 2001 build5.bat
-rw-r--r-- 1 spc spc 347 Oct 29 2001 build6.bat
-rw-r--r-- 1 spc spc 7834 Oct 29 2001 cas2rom.asm
-rw-r--r-- 1 spc spc 16350 Oct 29 2001 casin.asm
-rw-r--r-- 1 spc spc 18878 Oct 29 2001 casout.asm
-rw-r--r-- 1 spc spc 161718 Oct 29 2001 coco.asm
-rw-r--r-- 1 spc spc 14983 Oct 29 2001 disk.asm
-rw-r--r-- 1 spc spc 10003 Oct 29 2001 dskini.asm
-rw-r--r-- 1 spc spc 35476 Oct 29 2001 hardware.asm
-rw-r--r-- 1 spc spc 16514 Oct 29 2001 keyboard.asm
-rw-r--r-- 1 spc spc 16982 Oct 29 2001 keydata.asm
-rw-r--r-- 1 spc spc 76297 Oct 29 2001 port.asm
-rw-r--r-- 1 spc spc 14296 Oct 29 2001 portmask.asm
-rw-r--r-- 1 spc spc 1389 Oct 30 2001 readme.txt
-rw-r--r-- 1 spc spc 9503 Oct 29 2001 retrieve.asm
-rw-r--r-- 1 spc spc 94834 Oct 29 2001 stack.asm
drwxr-xr-x 2 spc spc 4096 Oct 28 2001 ver13rd
-rw-r--r-- 1 spc spc 18313 Oct 29 2001 vgacheck.asm
[spc]lucy:/tmp/coco/src>
Okay, you can argue about whether it should leave the original around or
not, but as you can see, the timestamps are kept at least.
Archives (i.e., a collection of files) is the domain of tar (originally
"Tape ARchive"). tar and gzip are orthogonal to each other, and typically,
one makes a tar file, which is then compressed by gzip (or conversely, you
gunzip a .tar.gz file, then use tar to extract the files). GNU tar
understands the gzip format and it can do the compression/uncompression in
addition to the archiving it does. And in this case, tar *will* keep the
original around when you decompress/extract the files:
tar xzvf sometarball.tar.gz
In the past ten years, my use of gzip/gunzip has been very minimal and is
usually restricted to compressing huge text files (say, log files) for
transmission across the net. Most of the time, I'm working with compressed
tar files and GNU tar can handle those without the use of gzip/gunzip.
Now, a major annoyance I find are tarballs that vomit files in the current
directory instead of a subdirectory based off the name of the tar file
(usually foobar.tar will, when extracted, create a directory called foobar
that contains the files; but that's a *convention* not mandatory).
-spc (Now Windows, on the other hand, I find incomprehensible ... )