Tar with exclusion

Sometimes I want to duplicate a Subversion-ed directory, without the .svn folders in each subdirectory. The reason for this is when I want to add/commit this newly duplicated folder, I get an error message because the .svn directory indicates that the files are already in the repository — when it is NOT.

We can do this easily by using tar and the exclude flag:

$ tar -cvf foo.tar ./* --exclude=.svn

#linux