ZIP command in Linux

 

The syntax is
 
zip -r filename.zip folder

zip -r filename.zip folder1 folder2

zip -r filename.zip /path/to/folder1 /path/to/file2

Zip dir1 & subfolder ignoreDir1 , ignoreDir2 but not add file in ignoreDir1 ignoreDir2
 
zip -r myarchive.zip dir1 -x dir1/ignoreDir1/**\* dir1/ignoreDir2/**\*

Zip dir1 but not add subfolder:  ignoreDir1 , ignoreDir2
 
zip -r myarchive.zip dir1 -x dir1/ignoreDir1/* dir1/ignoreDir2/*

Comments

Popular posts from this blog

Java : Variables Declaring

Install DNF in RHEL/CentOS 7

SQL Self JOIN