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

I don't have an account on StackExchange but the best way to avoid this is to always run find and then pipe to rm.

find . -name "whatevs"

hit enter, verify you are deleting what you expect then hit the up arrow and type:

| xargs rm -rf



...or just use `-delete`:

   find . -iname "whatever" -delete
Otherwise you're screwed if someone managed to put a file named "/" somewhere in your find directory, which `-delete` has safe-guard for.




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

Search: