[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

gzip.exe - How to Run On Windows XP ?

Posted on 2004-11-05
7
Medium Priority
?
2,804 Views
Last Modified: 2008-01-09
Hello,
Even though I'm running WinXP pro sp-1, the issue is with a unix utility with which the XP folks seem to be unfamiliar.  That's why I'm posting here.  I'm decompressing files with .tar.gz extension using GNU gzip.exe.
 
In Folder Options -> File Types, I've registered .gz to run a batch file called gzip.bat which calls 'gzip.exe -d %1'  But, when I double click the file I want to decompress all this does is eliminate the .gz leaving the .tar extension.  

How do I run this so the original .tar.gz keeps it's full extension and the files are unzipped in the temp directory (or prompt for directory name)?  Thank you.
0
Comment
Question by:WizeOwl
7 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 1000 total points
ID: 12507255
A something.tar.gz is a tar archive that's been compressed with gzip. To unpack the files on a windows box you need both the decompression tool and a tool to read the tar archive. What you have now is only the decompression tool and it is operating correctly and decompressing the file. To then unpack the something.tar file that 'gzip -d' you need a tar.exe for windows.

There are other tools for windows that can do all of this in one set.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12507504
Hi,

   WinZip can unpack tar.gz to a directory you choose. You don't need gzip.exe.

Wesly
0
 
LVL 2

Expert Comment

by:deurk
ID: 12507992
Winzip does the trick, so does Winrar which supports more formats...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:WizeOwl
ID: 12510551
Winzip and WinRAR have been losing files and folders when extracting the tar.gz's which happen to be over 15MB.  I've used these utils multiple times and always the same files are missing (different files for each app, RAR loses more than winzip so at first I thought winzip was working, but it loses files too).  I have not had these problems when I use gzip -d filename.tar.gz followed by Alladin's Stuffit (I'm not sure I want to spend the $40 on registered version just yet).  I just found my 'tar.exe' which I forgot I already had, so I'm going to try that.

Since I don't recall how to modify filenames in the batch file (anyone?),  I tried the following, GZ.bat,
   copy %1 %1.bak
  \bin\gzip -d %1 | tar -x
  pause

This should send the output file that gzip creates over to the input for tar.  But, I never see the output from tar.  (The 'pause' is just to see the results before the cmd window closes.)  I'd like to keep the script native to Windows rather than write a perl script.  More points for help with this. (I'll split with jlevie) Thanks.
0
 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 400 total points
ID: 12510593
Hi,
   How about cygwin? It's Unix-like envirnment in Windows. It collects all the GNU tools for Windows. Check it out.
http://www.cygwin.com/

   I try to use "tar" in cygwin, it can uncompress tar.gz within one shot:
# tar zxvf *.tar.gz  (or *.tgz)

Wesly
0
 

Author Comment

by:WizeOwl
ID: 12511114
Looks good.  Thanks for the tip.
0
 
LVL 88

Expert Comment

by:rindi
ID: 12518660
7Zip is like winzip but free.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question