Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 3
    Aliasing rm to anything is dangerous because it may break installer scripts. I learned this the hard way when I aliased rm to rm -i and had installs hang. Commented May 9, 2012 at 20:42
  • @Old Pro, that's the alias I use for rm in all my computers, from day 0, and I never had issues because of it. Care to give an example? Commented May 9, 2012 at 20:56
  • 3
    @OldPro: .bashrc is only used for interactive shells. If you run ./install.sh a new process is started and the alias will not be active. However, if you run . install.sh your current process will execute the installer and the alias is active. RTFM... Commented May 9, 2012 at 21:21
  • 3
    Then the installer was running an interactive shell and therefore was seriously broken. One broken installer is hardly enough reason to advise against shell aliases in general. YMMV Commented May 9, 2012 at 21:51
  • 3
    However, it is good advice to not alias the rm command, as morgant said, because you'll become comfortable with rm not actually removing files and then might accidentally delete something on a system where no such alias has been added. Also, moving a file to the trash is not as simple as just mv {} ~/.Trash. If the file is on a separate volume, for example, this will copy the file to your home directory and delete the original. Commented May 30, 2013 at 21:46