What is the difference between gunzip and unzip? Tried to search but couldn't find anything relevant with this.
zip algorithm same
*.zip files and gunzip decompress
gz algorithm that same
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 like
tarare used, typically resulting in compressed folders with a line ending
.tgz. This is what Wikipedia has to say about the gzip format and program.