Web Hosting Talk







View Full Version : Help! Serious Gzip User Error!


ITWeb LLC
02-05-2005, 12:30 AM
I can't believe how badly I just screwed up...

While trying to zip up my /shop/ directory, I used the command:
gzip -r shop public_html.zip

I don't know what happened, but now all of my files in that folder have been appended with .gz and nothing works!

Any ideas how I can clean the files?

Thanks!

SimplyDiff
02-05-2005, 01:57 AM
That's becaus gzip doesn't do what you think it does.

As for undoing it, from the man page on one of my installs:

-r --recursive
Travel the directory structure recursively. If any of the file
names specified on the command line are directories, gzip will
descend into the directory and compress all the files it finds
there (or decompress them in the case of gunzip ).

ITWeb LLC
02-05-2005, 02:01 AM
Any ideas on how to undo it?

EXOWorks
02-05-2005, 06:31 AM
Try:

man gunzip or gunzip --help

krumms
02-05-2005, 09:44 PM
gunzip -r shop

And then, to do what you were intending to do:

tar cfz shop.tar.gz shop

shop.tar.gz will then contain the shop directory, which you can later extract using:

tar xvfz shop.tar.gz

but please, PLEASE, before extracting the files do a test run somewhere safe before you go overwriting your home directory or something :P