-1

Let's say I want to create an alias for srm (safe remove), such that everytime srm is used, an interactive rm command runs, e.g. rm –i. This change needs to be made to the necessary configuration files such that the alias is set every time any user logs in. Also show that your alias works.

How would i go about doing this?

1
  • What shell are you using? Commented Jun 2, 2015 at 1:35

1 Answer 1

5

Edit your ~/.bashrc, adding the following line to the bottom:

alias srm="rm -i" 
Sign up to request clarification or add additional context in comments.

1 Comment

you can use doskey command to set an alias if you are a windows user like this doskey ls=dir then running ls will run dir command

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.