3 ms·
Can't we cd /path/to/wherever rm -rf *.mp3 ?
by presidentender 13y ago
Can't we
cd /path/to/wherever
rm -rf *.mp3
?
- aaronem 13y agoYou have stumbled squarely into the tripwire implicit in that question; "rm -rf *.mp3" ignores directories whose names don't end in ".mp3", and deletes those whose do.
- code_duck 13y agoIt's supposed to be recursive. That would only delete the files in the current directory, not subdirectories as well.
- presidentender 13y ago-r is the 'recursive' flag.
- aaronem 13y agoYes, but it doesn't do what you think it does. Feel free to try it for yourself if you don't believe me.