trying to exclude all .svn folders in the zipped subfolders
zip -urq bebe.zip * -x .svn
doesn't work...
trying to exclude all .svn folders in the zipped subfolders
zip -urq bebe.zip * -x .svn
doesn't work...
Try zip -urq bebe.zip * -x '*/.svn'
It seems like -x works with file names and not with directories. I don't fully understand how this option works.
But I do have a solution for your question :
find . -type d -name .svn -prune -o -print | zip -uq bebe.zip -@
The find
command excludes all directories named .svn (-type d -name .svn -prune
) and lists all other files and folders (-o -print
). The list is passed to zip through a pipe (-@
option read list of files in standard input).
If you don't want to only include directories with regular files, you can use -o -type f -print
instead.