Search Suggest

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/*







Đăng nhận xét