Quick question, how do I recursively remove files of a specific extension? I wish to remove all .svn folders from a project.
rm -Rf www/ "*.svn"
The above seems to remove everything. Im using FreeBSD.
Thanks
|
feedback
|
|
Ensure that you are happy with the list first.
Restrict to directories. SVN always names them
| |||||||||||||
feedback
|
|
I like to use the xargs command, i find it more intuitive, so:
if you want to remove .svn folders, if you are interested in deleting files:
or you can remove everything:
if you want to be sure of what you will delete, launch the find command without the xargs :-) good luck! | |||||||
feedback
|
|
chdir to the the working directory and run:
OR you can specify the path directory like this:
| ||||
|
feedback
|
|
By typing :
You ask to remove the www folder and every *.svn files. What you certainly want is to remove every *.svn inside the www folder, so you should use:
(without the space) | |||
feedback
|
|
not sure if this is the best way to get rid of a repository, but this should do what you need:
Update: here is a nice description of BSD's | |||||||
feedback
|
.svn" and their contents. So please clarify your question. – Teddy Oct 7 '09 at 11:50