Ziping but excluding some directories, how?

I am trying to zip folder but to exclude some directories that I don't need.

Tried zip -r .* -x clients/ portfolio/ where I want to exclude those 2 directories and their childer, but they keep getting zipped, how to do this?

3 Replies

Solved it here … bzip-linux">

That link is completely unrelated to your stated problem…

You are very correct, wrong link, here is the one that works and has that info. … exclussion">


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct