Notice also that the original files are still sitting there.
Notice how this command requires that a name be provided for the zipped archive where gzip simply uses the original file name and adds the. Here's an example of gzip at work: $ gzip onefile In other words, it leaves a compressed file - not the original file alongside the compressed copy. For another, the gzip command zips “in place”.
For one thing, the gzip command is used only for compressing a single file where zip can both compress files and join them together into an archive. It uses what is essentially the same compression algorithm as gzip, but there are a couple important differences. The basic zip commandįirst, let’s look at the basic zip command. So, in this post, we’re going to look at standard zipping and unzipping as well as some other interesting zipping options. Even so, there are some interesting variations on zipping that not all of us have tried. Some of us have been zipping files on Unix and Linux systems for many decades - to save some disk space and package files together for archiving.