Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to Linux and its terminal. I'm using Ubuntu 12.04, trying to learn about the Terminal's commands. I learned how to remove files and directories but saw that the system never asks you if you are sure to remove or not, like showing a Y/N question, is there a way to have that (instead of using rmdir and rm and rm -R) ? like some command that generates a Y/N confirmation question.

share|improve this question
up vote 6 down vote accepted

When you type rm -i fileA fileB fileC, you'll get asked for confirmation for every file.

So you could define the alias rmi=rm -i in your shell's configuration (e.g. ~/.bashrc for bash), and learn to type rmi instead of rm.

Some Linuxes even define rm=rm -i, but then you'll start relying on this behavior whenever you enter rm.

You could also install trash, which brings a "move to trash" command to your shell.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .