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 file.zip .* -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

http://www.drupaldump.com/extracing-tar … bzip-linux">http://www.drupaldump.com/extracing-tar-files-without-and-gzip-or-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.

http://www.drupaldump.com/archiving-you … exclussion">http://www.drupaldump.com/archiving-your-files-migration-folder-exclussion

Reply

Please enter an answer
Tips:

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] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct