
-f option : Sometimes a file cannot be compressed. This command will create a compressed file of mydoc.txt named as and delete the original file. #LINUX UNZIP GZ ZIP FILE#
If you archive and compress 10 identical files with ZIP and GZIP, the ZIP file would be over 10 times bigger than the resulting GZIP file. Since the compression algorithm in GZIP compresses one large file instead of multiple smaller ones, it can take advantage of the redundancy in the files to reduce the file size even further. GZIP’s disadvantage in how it operates, is also responsible for GZIP’s advantage. When pulling a 1MB file from a 10GB archive, it is quite clear that it would take a lot longer in GZIP, than in ZIP. With GZIP, the whole file needs to be decompressed before you can extract the file you want from the archive. When you want to pull a single file from a ZIP, it is simply extracted, then decompressed.
In ZIP files, the individual files are compressed and then added to the archive. The common practice with GZIP, is to archive all the files into a single tarball before compression.In general, GZIP is much better compared to ZIP, in terms of compression, especially when compressing a huge number of files.ZIP and GZIP are two very popular methods of compressing files, in order to save space, or to reduce the amount of time needed to transmit the files across the network, or internet.ISRO CS Syllabus for Scientist/Engineer Exam.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.