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

Wouldn't that just delete the folder instead of emptying it?


Back in the day, rm followed .. if you specified it on the command line. It went like this:

You are in .; The current directory listing include ..; Recursively deleting everything deletes everything on the drive.

Actually, I think the one time I saw someone do this, wildcards were involved. And I was going to explain, but the comment system is making my asterisks into bold markers.


I can't get the wildcard character to show up ... it should be x.x


You can prepend two spaces to insert <code> (http://news.ycombinator.com/formatdoc):

  rm -rf ./*
  rm -rf  *.*
To stay on topic, because of this thread, I just added alias rm="rm -I" to .bashrc, and I have never yet needed -f.




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

Search: