Reputation: 1514
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.
Upvotes: 0
Views: 74
Reputation: 2909
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.
Upvotes: 1