Zip command in linux

zip - collection and files and directory. It compresses and reduces the actual data size. 

  • It has .zip extension

  • Free tool for archiving 

  • Support compression 


Install package in Ubuntu

sudo apt-get install zip


Install package in CentOS

yum install zip


Archive file in zip

zip name.zip filename


Archive directory in zip

zip -r name.zip directoryname


List archive file from zip

zip -l name.zip


Unzip zip file

unzip name.zip


Removes the file from the zip archive

zip –d filename.zip file.txt


Update file in zip

zip -u name.zip filename


Exclude file when archive

zip -r name.zip Directory_name Directory_name/filename


Exclude directory when archive

zip -r name.zip Directory_name Directory_name/directory_name/*







Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment