How to remove files, containing tilde in the filename or extension, recursively?
For example, files of the vim, with the names like .my_file.c.un~?
I'm using this find sequence for that:
find . -name "*.un~" -o -name "*.swo" -o -name "*.swp" -exec rm -f {} \;
But it doesn't remove the files. Still running just a pure find displaying a list of the files correctly:
./.my_file.c.un~
./.my_file.c.swp
./.file2.c.un~
Also, removing them with the pure rm -f .my_file.c.un~ works perfectly. Changing the -exec rm -f {} \; into the -delete still doesn't help.