What's the difference between gunzip and unzip?
unzip decompress zip
algorithm same *.zip files
and gunzip decompress gz
algorithm that same *.gz files
.
If you migrated from windows, You have many compression algorithm in UNIX world such as *.7z , *.gz , *.bz2 and so on. Also you can compress file which already archived with tar command:
such as :
tar -zcvf mydir.tar.gz mydir #gz and tar
tar -jcvf mydir.tar.bz2 mydir #bz2 and tar
tar -Jcvf mydir.tar.xz mydir #xz and tar
They are two different programs to unzip two different types of compressed files:
- unzip: "list, test and extract compressed files in a ZIP archive" (from the man page). The Zip file format is the most commonly used compression format on Windows machines, the file ending is typically
.zip
. See the Wikipedia article for more information. - gunzip: For a similar file format for single compressed files, much more common in Unix/Linux systems. The file ending is typically
.gz
. gzip files contain only one compressed file, if compression of a folder-like structure is required, additional tools liketar
are used, typically resulting in compressed folders with a line ending.tar.gz
or.tgz
. This is what Wikipedia has to say about the gzip format and program.