LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Deleting from command line (https://www.linuxquestions.org/questions/linux-newbie-8/deleting-from-command-line-487485/)

Reaver76 09-27-2006 02:57 PM

Deleting from command line
 
Hi everyone! I'm a newbie that is just starting to learn about Linux, so I'll be bothering you with questions like the one I'll ask now...

Say I have files called Testing, Testing1, Testing2, Testing3, and so on. I want to keep the original Testing file but delete the other Testing files with one command. How would I do that?

I thought a command like:

>rm Testing[*]

would work, wouldn't it?

acid_kewpie 09-27-2006 03:21 PM

no, that doesn't make sense, and if you were to run the legal version... "rm Testing*" then that would be bad as * can be null too. instead use ? to signify a single character. "rm Testing?" will match anyhting with a single character after the word "Testing"

Reaver76 09-27-2006 04:42 PM

Great! Thanks so much for the reply. I did a

>rm Testing?*

command, and it worked!


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