If you have more than one subdirectory to zip up, just add a space and repeat the code at the end, for example:. This will zip up the entire contents of your directory, but skipping the contents of those sub directories. Note you might need to put quotes around some of this in certain flavours, but this should work in Ubuntu or CentOS Linux, which are our favourites.
I am trying to ZIP a directory and want to exclude a couple of subdirectories. Use the following command to exclude the. All the Node. Now we can easily make a single zip file of many files and can email it to anyone easily. Save my name, email, and website in this browser for the next time I comment. Facebook Twitter Instagram. TecAdmin Home Ubuntu Related Posts. Improve this answer.
Jakub Kukul Jakub Kukul 2 2 silver badges 6 6 bronze badges. Thank you. This is the only answer that really works. Something like this should do the trick: zip -r zipped. Many thanks. This works perfect for me on Ubuntu Tarik Tarik 9 9 bronze badges.
In the folder you want to be zipped: zip -r abc. ThunderBird 1, 13 13 gold badges 17 17 silver badges 30 30 bronze badges. Ali Hatam Ali Hatam 1.
Sign up or log in Sign up using Google. So if you want to exclude everything in the dir1 dir2 directories and any file named file1 file2 then try something like this: zip -r file. Tom Tom 1 1 1 bronze badge. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.
The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Related Hot Network Questions.
0コメント