LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rm several files, how to answer "yes to all" ? (https://www.linuxquestions.org/questions/linux-newbie-8/rm-several-files-how-to-answer-yes-to-all-432138/)

lonecrow 04-05-2006 08:24 PM

rm several files, how to answer "yes to all" ?
 
Ok here it is. I have about 200 files I want to rename. I use the following command

Code:

rm x*
pretty simple.

But then it asks me for EACH file if I want to remove the regular file x001, x002.....

I dont see the point of the command if I have to type "y" each times it asks me that. I must be mising something here.

I have tryied answering "all" but it doesnt work.

Anyone?

sumguy231 04-05-2006 08:33 PM

Why are you using rm (delete) to rename files instead of mv? Did you mean 'remove'? Anyway, use the -f option. (Force deletion without promtping. Be careful with this!)
Next time you need help with the usage of a command, type 'man <command>' for a manual.

lonecrow 04-05-2006 09:19 PM

lol

sry I meant remove!!!!

Thanks, didnt know that -f was actually doing it without asking

Thanks a lot and sorry again!

sumguy231 04-05-2006 09:26 PM

Don't apologise. :)

ethics 04-06-2006 03:15 AM

i like to use -v aswell, it outputs the files it's deleting line by line, lets me know how it's doing and whether it's hung on a large file or something :)

Like stated
Code:

man <command>
gives you all the useful options for a command.


All times are GMT -5. The time now is 05:49 AM.