I want to use zip on most of the directories in my home directories but there are a few specific directories (let's call them dir1 and dir2) with contents that I do not want zip to add to my subsequent archive file. I tried

zip foo.zip ./* -x@exclude.lst

with exclude.lst containing:

./dir1/*
./dir2/*

but zip still is including the contents of those directories. How can I have zip skip the contents of those specific directories?

有帮助吗?

解决方案

I tried this using just:

dir1/*

in the file and found that dir2/ gets included but dir1/ and things under it don't.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top