Turn off rm, mv interactive prompting when ssh-ed into access.cims.nyu.edu

Alec Jacobson

December 16, 2009

weblog/

When I ssh into access.cims.nyu.edu and issue a rm or mv command I am bombarded with prompts for every file. For example if I issue:
rm *.pdf
I have to type yes <ENTER> for every pdf in the current directory. I have tried the -f option listed in the rm man page, but I'm still prompted. I wondered if there was a way to turn this prompting feature off. It would be very convenient if rm-ing and mv-ing acted the same way in access.cims.nyu.edu as the other unix and linux machines I used, use and will use. I emailed the Courant help desk and got a solution:
That's because in the system-wide .bashrc, the mv, cp, and rm commands are aliased to "mv -i", "cp -i", and "rm -i". To unalias these commands in your environment, you just need to add the following lines to the end of your ~/.bashrc.
unalias rm
unalias mv
I did just that and now everything works fine.