Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 5 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.