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?
aliasin the shell. Is there one forrmthat looks likealias rm='rm -i'? – ott-- Dec 5 '11 at 15:55rm -r widgetshould normally ask if -f isn't given, shouldn't it? Or did I add that alias and completely forget about it? – Rob Dec 5 '11 at 16:17rm -rdeletes recursive and asks for readonly files,rm -rishows the above behaviour andrm -rfjust removes. – ott-- Dec 5 '11 at 17:43