6
2
Usually whenever I remove directories, "rm -rf " works. But sometimes I get this response:
"rm: examine files in directory / (yes/no)?"
Then I try "\rm -rf ", and that works. Can anyone explain why?
6
2
Usually whenever I remove directories, "rm -rf " works. But sometimes I get this response:
"rm: examine files in directory / (yes/no)?"
Then I try "\rm -rf ", and that works. Can anyone explain why?
10
Someone, either your system administrator or your linux distribution (you didn't specify what form of unix you are using) has aliased rm
to rm -i
. Take a look at what man rm
says:
-i Request confirmation before attempting to remove each file, regardless of the file's permissions, or whether or not the standard input device is a terminal. The -i option overrides any previous -f options.
You can see the actual binding of any command with the which
command: which rm
will say something like:
rm: mapped to rm -i
To execute the real rm, type \rm
, as you have already discovered.
+1 At least someone explains what that -i
actually means. – fretje – 2010-02-07T13:58:40.060
5
your rm command is alias, most likely rm -i
.
check your shell alias.
2
Also consider calling it as: yes | rm -rf
2
Most of the new linux distro are making safy aliases
usually the rm
command is aliased to rm -i
.
You can remove that alias if you don't need it by doing rm='rm'
, also to make it automatic take a look at bash configuration files.
Good luck
If it asks you whether to examine the files in '/', do you say 'yes' or 'no'? And does the machine continue to work afterwards? Be very careful about deleting everything under root when running as root; the machine keeps going for a surprisingly long time, but there comes a point at which you have to reboot - off a CD or something similar. – Jonathan Leffler – 2010-02-07T03:13:10.910