On my server rm always asks me for permission (even though I'm root) when I run it, on my desktop it does not. Like so:
$ rm mod_wsgi-3.3.tar.gz
rm: remove regular file `mod_wsgi-3.3.tar.gz'?
How do I make it stop prompting me?
On my server rm always asks me for permission (even though I'm root) when I run it, on my desktop it does not. Like so:
$ rm mod_wsgi-3.3.tar.gz
rm: remove regular file `mod_wsgi-3.3.tar.gz'?
How do I make it stop prompting me?
I would check if your
rm
is an alias. Typingalias
at the command line you will see all defined aliases. I expect something likeIf so, the alias is probably defined in in
~/.bashrc
, so you can remove the alias altogether or change it to suit your needs.Alternatively, you can remove the alias for the current terminal session using
unalias rm
.rm -f mod_wsgi-3.3.tar.gz
WARNING: use with caution.
From the man page:
The greatest what I found is
this will run the original unalias version and keep the alias intact.
We can also use shell built-in
command
for instancecommand rm file
but I surely enjoy the less verbosity in first one
Another way to get around the defined
alias
is to give the full path when you don't want to be prompted:I like to leave an alias to
rm -i
in place for safety, for when I'm hacking around in the middle of the night and typingrm ...
. But when I'm alert enough to remember that I don't want to be prompted, I type/bin/rm ...
.