Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-11-2006, 02:25 PM   #1
Registered: May 2005
Distribution: Fedora
Posts: 92

Rep: Reputation: 15
using alias to make rm into rm -i

i can not for the life of me figgure out how to use the alias command for bash.

i know it should not seem so hard, just rtfman page and figgure it out. but that did not work for me. i just got quite confused.

i would like to make typing "rm" execute "rm -i"

could anyone help me out?

thanks in advance.
Old 01-11-2006, 02:31 PM   #2
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
have you tried
# man alias ?

alias rm="rm -i"
Old 01-11-2006, 02:33 PM   #3
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Put this into your ~/.bashrc file. If one doesn't exist then create one.

alias rm="rm -i"

I would add a "v" to the alias as in the examples below. I find the following aliases to be useful.

alias cp="cp -iv"
alias mv="mv -iv"


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I make an alias? quintan Linux - Software 2 11-25-2005 03:44 AM
How to make an alias? Gins Linux - General 6 06-06-2005 07:13 PM
make an alias in winXP zchoyt Linux - General 2 09-14-2004 08:33 AM
Make symbolic link or alias gubak Linux - Newbie 5 08-20-2004 12:50 PM
How do i make an alias on my webserver? meluser Linux - Software 14 03-13-2003 03:11 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration