View Single Post
Copernicus's Avatar
Posts: 1,986 | Thanked: 7,698 times | Joined on Dec 2010 @ Dayton, Ohio
#6
You should be able to use the backtick operator to pass the output of find to rm, as so:

Code:
rm `find | grep m4p`
I think the -R option of rm only applies to directories, so I doubt that would be of any use here.

Actually, I'm kind of surprised that that find command works for you; I thought you'd at least have to specify the path to look for files. I usually give find a command something like this:

Code:
find . -name "*.m4p"
Which asks find to look in the current directory (".") for files with the extension m4p. find will recurse through any subdirectories by default, but I don't know if it will enter hidden directories; you might have to run the command something like:

Code:
find .sounds/Music -name "*.m4p"
So, in total, I'd probably have:

Code:
rm `find .sounds/Music -name "*.m4p"`
Check the output of the find command first, though, to be certain what you'd be deleting...
 

The Following User Says Thank You to Copernicus For This Useful Post: