Sean Killeen bio photo

Sean Killeen

Just a guy trying to get better at writing bios.

Email Twitter Facebook Google+ LinkedIn Instagram Github Stackoverflow Foursquare
Edit this page | Issue? Question?

Problem

I have a directory structure that contains Subversion metadata folders (folders named “.svn”).

I would like to remove those folders but “svn export” won’t work.

Solution

Rsync to the rescue. Let’s say the folder containing .svn folder structures is named “problemfolder”. Do the following:

  • In the same directory as the problem folder, create a “clean” folder to output the contents of problemfolder to eventually.

    “mkdir problemfolder_clean”

  • Run rsync, excluding .svn folders and their contents, to copy the problem directory to the clean directory.

    rsync -avr –exclude=’.svn*’ /path/to/problemfolder/ path/to/problemfolder_clean

At this point, the contents of “problemfolder” (minus the .svn folders) will be in the clean folder you created.