In Linux zip, is it possible to zip a folder recursively except for a given sub-path?
For instance, to zip ‘base_folder’ and all its sub folders except ‘base_folder/sub_folder’.
Is it possible?
And if so, how?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
zip -r base_folder.zip base_folder -x base_folder/sub_folder/\* base_folder/another_sub_folder/\*(I have incorporated the improved information from your experience that you have kindly offered in your comment.)
For more information:
man zip