0

What I need is to extract all .svn-folders from a project within their original directory structure and make a tar file out of it. So that in the archive I have only the emtpy folders with all .svn-folders and their contents in it.

4

1 回答 1

1

You can do this by using tar a bit like cpio, by selecting directories using find. EG:

find . -name .svn -print | tar --create --files-from - > /tmp/stuff.tar

If you want, you can avoid problems with whitespace using -print0 instead of -print, and tar --null.

于 2012-07-09T17:31:45.057 回答