Exclude Directory While zip file in unix platform
| June 7, 2010 | Posted by Subikar under linux, uniz, zip command |
If you want to zip file and exclude some directory while file zip in linux you can simply use the below command.
zip -r filename.zip folder -x folder1 folder2
Where as folder is the going to zip in the name of filename.zip and folder1 and folder2 will be exclude from while zipping.
Good job not testing your command. -x only works with files, not directories or folders.
Good job not to rtfm
Exclude directories: -x cache/upload/upgrades/temp\*
I enjoy you because of all your work on this site. Ellie delights in conducting investigation and it is easy to understand why. We all hear all regarding the compelling method you create insightful solutions by means of the website and therefore increase contribution from website visitors on the subject so our own simple princess is actually starting to learn a lot. Have fun with the remaining portion of the new year. You’re the one performing a fantastic job.