Zip in Centos (Linux)

How to use Zip?? Command as below.

zip -r filename.zip files

will zip the file

Note:filename represents the file you are creating and files represents the files you want to put in the new file

unzip filename.zip

will unzip zipfile

zip filename.zip file1 file2 file3

will compress file1, file2, file3 and put them in filename.zip

If you add directory to multiple files

zip filename.zip file1 file2 file3 /home/kcyeapnet/public_html

will compress file1, file2, file3, the contents of the /home/kcyeapnet/public_html directory and put them in filename.zip

Leave a Reply

Your email address will not be published. Required fields are marked *