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? |
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"
|
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. |