Aliasing rm to rm -i for sudo
mathbymath at aol.com
Mon Jun 20 14:24:47 UTC 2005
On Jun 20, 2005, at 4:16 AM, R (Chandra) Chandrasekhar wrote:
> Dear Folks,
> I have aliases for rm to be rm -i in the .bashrc files for an
> ordinary user as well as for root so:
> alias rm='rm --interactive'
> When I do rm <filename> as an ordinary user, I am asked to confirm
> Likeweise, after sudo -s -H, when I do rm <filename> I am asked to
> confirm deletion.
> However, if I do sudo rm <filename> deletion proceeds without
> interactive confirmation.
> How may I alias rm to rm -i for sudo?
alias "sudo rm"="sudo rm -i"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ubuntu-users