www.webcodingtech.comCoding Technologies for the Web |
Home | | | Php | | | JavaScript | | | SQL | | | HTML | | | Server Admin | | | Tools | ||
![]() | ||||||||||||||
|
|
How to Gunzip on Unix/LinuxDid 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 WindowsSo 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
Unzip the tar.gz file on your serverAfter 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
and press Enter. This will unzip the file to myfiles.tar and delete the *.gz file in the process. Now type
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 .
|
|
http://www.webcodingtech.com