|
Using gzip/gunzip to Compress/Uncompress Files
gzip is a UNIX program for compressing files. Developed under the GNU public license, gzip can usually at least halve the space that a file takes up. Furthermore, its compression method is well supported by other utilities on other computing platforms (such as WINZIP and Stuffit Expander), enabling you to decompress and work with your files on other computers It is important to note that when you compress files, the originals are not deleted. You will have to delete them manually using the rm command. |
|
BEFORE YOU BEGIN |
You must...
|
Using GZIP (compress) and GUNZIP (expand) |
|
Text files, such as computer code, compress very well. On the other hand, binary files can be compressed, but not at the efficieny of plain text files. Images files, JPEGs, for example,
are already compress and gzip may not compress them much further.
GZIP To Compress Files: The syntax for Gzip is gzip filename The resulting file will be filename.gz - notice the .gz file extension. If you were compressing a tar file for example, the resulting file would be filename.tar.gz, and so on.To achieve better compression, you can use the -9 option. (i.e. gzip -9 filename) This will take a little longer, but will result in your compressed file taking up less space. GUNZIP To Expand Files: To uncompress a file, the sister to Gzip is Gunzip. To uncompress a file, simply type gunzip filename Just like any UNIX program, full usage instructions for Gzip can be found using the man tool. Simply type man gzipat the prompt for full instructions. |
| Support & Contact Info: Help Desk: (202) 994-5530 EAS Help Desk: (202) 994-5530, option 4 System Status: (202) 994-5530, option 3 Support: ITHelp Request Suggestions: suggest@gwu.edu |
![]() |
Help Desk Hours: Monday-Friday: 7:00AM - 10:00PM 44983 Knoll Square, Bldg II, Suite 351 Ashburn, VA 20147 ITS Fax: (202) 994-0101 Help Desk Fax: (703) 726-4111 |