Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can't we

    cd /path/to/wherever
    rm -rf *.mp3

?


You 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.


It's supposed to be recursive. That would only delete the files in the current directory, not subdirectories as well.


-r is the 'recursive' flag.


Yes, but it doesn't do what you think it does. Feel free to try it for yourself if you don't believe me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: