I have a directory "mapnik" with hundreds of sub-directories, each containing more than 10000 files. I would like to zip "mapnik" recursively, preserving the folder-structure but only adding files greater than 103 Byte to the archive.
How can I accomplish this? I tried using find and pipes, but with the wrong syntax and the huge number of files, "trial and er开发者_JS百科ror" is not the best way to get it done ;)
Thanks for your help guys!
How about
find -size +103c -print0 | xargs -0 zip -r outname.zip
Delan's suggestion produced some kind of zip-error whith files of the same name. But it got me on the right track. This is what worked for me:
cd mapnik
find . -size +103c -print | zip archive.zip -@
精彩评论