Home | Php | JavaScript | SQL | HTML | Server Admin | Tools
Server Admin
Gunzip on *nix
Other sites
Image Editor
Top 10 web hosting reviews

How to Gunzip on Unix/Linux

Did you ever have a large file or many files to upload to a server? If bandwidth is of any concern to you, (and it should be), you will want to save as much as possible.

Gzipping on Windows

So to save bandwidth, you need to compress your file/files before uploading them, and then uncompress them on the server. One of the best (smallest) file formats is the combination of tar/gzipping. If you are on the Windows platform, you can still do this. Download the 7zip software and install it. Then select the files you want to upload, right-click, and choose "Add to archive". Now in the 7-zip window, choose "tar" as the compression method. This will create a tar file that is about as large or larger than your original file/s, but don't worry, we aren't done yet! Now select the tar file and right-click again, choosing Add to archive. Now this time in the 7-zip window, choose gzip as the compression method and away you go. Now you have a file myfiles.tar.gz

Unzip the tar.gz file on your server

After uploading the file (which was much smaller than your original file/s), you are ready to gunzip it. You will need to telnet into your server or use and SSH client if you can, it is much more secure. If you need a good SSH client, try Putty. I don't have the link handy, but if you search Google for Putty or SSH Putty you will find the download page.

Once you have opened a connection to your server, "cd" to the directory that your *.tar.gz file is. Now type

gunzip -d myfiles.tar.gz

and press Enter. This will unzip the file to myfiles.tar and delete the *.gz file in the process. Now type
tar -xf myfiles.tar

to untar your *.tar file. Now simply delete the *.tar file and close your SSH session. That wasn't too hard, was it now! :) To delete the *.tar file, simply use the UNIX command unlink. You could use something like this: unlink myfiles.tar.

Link back to this page

Copy and paste this HTML code into your page to link back to this very page:

Or just link to the WebCodingTech site:

And your link will look like this:
      Inspired by stuff found at www.webcodingtech.com.


Copyright © 2005 WebCodingTech.com Our URL is: http://www.webcodingtech.com