I am trying to delete a massive directory and cannot get the rm
command to work.
I want to delete the widget
directory which contains thousands of files and folders. Obviously I do not want to descend into each subdirectory and have to confirm the deletion for all 5,000 files/folders.
So I type:
rm -r widget
The prompt asks me:
rm: descend into directory 'widget'?
I type no
and then re-run an ls
. The folder is still there. If I rerun the rm -r widget
command, but instead this time type yes
, it will descend into the massive subdirectory structure as predicted.
What is going on here?
alias
in the shell. Is there one forrm
that looks likealias rm='rm -i'
?rm -r widget
should normally ask if -f isn't given, shouldn't it? Or did I add that alias and completely forget about it?rm -r
deletes recursive and asks for readonly files,rm -ri
shows the above behaviour andrm -rf
just removes.