-   Linux - Newbie (
-   -   how to do yes to all when deleting a dir recursively (

dr_zayus69 12-01-2004 07:47 PM

how to do yes to all when deleting a dir recursively
hi. i want to rm a directory but don't waht to have to click y enter when it prompts me about all the files inside. What option would add to rm to make it say yes to all?

65_289 12-01-2004 07:53 PM

Try rm -rf <directory name here>

dr_zayus69 12-01-2004 08:01 PM

thanks, that was my idea but i wasn't sure.

mikeyt_333 12-01-2004 08:01 PM

the -i flag is also set to do this, it's in your .profile or /etc/profile I believe, but can't remember. This normally only happens as root though, and I'd leave it so you don't go destroying something you don't want to.

dr_zayus69 12-01-2004 08:03 PM

while on the subject of removing. I have a tar file i want to remove. When i go to rm it i can hit tab to complete the name. I can see it when i do ls but when i try to rm it it says no file or dir exist

btmiller 12-01-2004 11:39 PM

There may be spaces at the end of the filename or something. Shell globbing can work nicely here, e.g. if the file starts with foobar, you can do rm -i foobar * (the -i is so you don't accidentally delete something else starting with foobar).

LasseW 12-02-2004 03:42 AM

You can temporarily get rid of the questions if you have an aliased rm. Type alias to see if this is so. The do

unalias rm

to restore the original bash rm command. Next time you login rm will ask for confirmation again.

All times are GMT -5. The time now is 10:39 PM.