To create a compressed file and save disk space use following the following syntax:
zip options name.zip file1 file2 file3 folderThe zip program compress one or more files into the name.zip archive. Zip has an options from "1" to "9". The option -1 use for a fast compression and -9 for better compress ratios.
zip -9 name.zip file1 file2If you want to insert a new file to the existing zip archive use options "u" which means update.
zip -u name.zip newFileTo decompress the zip archive use command:
unzip name.zipTo decompress to a specific directory use "d" option:
unzip name.zip -d /directoryCommand tar is great tool too. You can compress files with tar:
tar -zcvf name.tgz file1 file2 file3 folderTo unzip compressed file type:
tar -zxvf name.tgzWas this information helpful to you? You have the power to keep it alive.
Each donated € will be spent on running and expanding this page about UNIX Shell.
We prepared for you video course Marian's BASH Video Training: Mastering Unix Shell, if you would like to get much more information.
Thank you. Marian Knezek