Bash — svn rm on all matching files

I’ll need this in the future. I needed to do “svn rm” on each instance of something.pyc to remove it from the respository.

Found the solution online (sort of).

find -name "*.pyc" is the obvious part.

find -name "*.pyc" -exec svn rm {} \;

will erase all files ending in .pyc via svn rm.

Alternatively, you can also use something like

find -name "*.pyc" | xargs svn rm

kylefox below says that he needed to specify the path, which would be for current directory find . -name “*.pyc” -exec svn rm {} \;

2 thoughts on “Bash — svn rm on all matching files

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s