Glam Prestige Journal

Bright entertainment trends with youth appeal.

I'm trying to delete all .class and .csv.gz files from my svn directory and all subdirectories. Can anyone tell me how to do it automatically with a command ? I have RabbitSVN installed on my Ubuntu.

The svn command for removing a file is: svn delete fileName

8

1 Answer

You can delete all the relevant files from your local system with:

find /path/to/dir -type f \( -name "*.class" -o -name '*.csv.gz' \) -delete

If you then commit the changes, the remote files should also be removed. Alternatively, you can run svn delete on each of the files:

find /path/to/dir -type f \( -name "*.class" -o -name '*.csv.gz' \) -exec svn delete {} \;

You could probably also just do this directly:

shopt -s globstar
svn delete **/*.class **/*.csv.gz
4