Hacker News new | past | comments | ask | show | jobs | submit login

In the spirit of sharing: one of my favorite lines in my bashrc is the alias of `rm` to `rm -i`. This prompts for a confirmation. You might not need it but I deleted some important, not-yet-checked-in-git files in the past by accident.

If you want to delete everything and don't want to keep typing yes just do `yes | rm bla`.




No need to do that: just pass -f. The last flag "wins":

  $ rm -fi blah
  remove blah?
  $ rm -if blah
  $ # confirmation suppressed


With GNU rm, you can put the -f at the end, which I do for safety.

  rm -i x y z -f




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

Search: