Reputation: 2587
i am trying to set up a prompt in terminal as a safety net to ask me yes or no when I want to
-cp
, -rm
, -mv
etc. I created a ~/.bashrc
file but my syntax inside the folder is wrong i believe because i do not get a prompt when i execute one of the following commands. Can anyone tell me the proper syntax for doing this in bash? Here is what i have in my ~/.bashrc
now
alias rm ‘rm -i’
alias mv ‘mv -i’
alias cp ‘cp -i’
This works on .tcshrc but apparently not in bash, any help is appreciated.
Upvotes: 0
Views: 105
Reputation: 274562
The syntax in bash is alias name=value
.
For example:
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
Check the man
page for more information.
Upvotes: 2