.gz is conventionally used as an extension to files that have been compressed using the GNU
gzip utility (or the compatible algorithms in the
zlib libraries). This is added to any previous extension. Thus a
.tar file that as been compressed (either uzing gzip separately or using the -z switch to GNU
tar utility, which creates a gzip subprocess and pipeline pair) usually has a .tar.gz extension, sometimes shortened to .tgz.
An older UNIX compression utility is/was called
compress and conventionally was used with the
.Z extension. A newer Linux/UNIX compression utility is called
bzip2 and is used with the
.bz2 extension.
One can use the UNIX/Linux
file command to detect compressed files (or any standard type of file formatting) regardless of filename and/or extension. Notably the GNU
guzip utility will refuse to attempt to decompress files which are lacking the .gz extension. One can either rename the file(s) to conform to the conventions or pass the file through the utility as a filter:
cat $FILE | gzip -dc or by using the
zcat utility.
Contributors
- () JimDennis - 23 Sep 2003
- If you edit this page: add your name here; move this to the next line; and if you've used a comment marker (your initials in parenthesis), include it before your WikiName.
Revision Comment
Page Ratings