Advertisement

07.13.2008 at 05:29PM PDT, ID: 23561451
[x]
Attachment Details

Linux rm command

Asked by Simon336697 in Bourne-Again Shell (bash), Perl Programming Language

Hi guys hope u r well and can help.
Pretty easy this one i hope.

I have a list of files in a directory in the following format:

menu3_career_resumes_examples.php  
menu3_career_resumes_examples3.php                
menu4_career_resumes_examples_imageskb.php
menu4_career_resumes_examples_documentskb.php  
menu4_career_resumes_examples_imageswk.php
menu5_career_resumes_examples_test.php

I wanted to know how I can use the rm command to remove all the above files in one go without having to do 3 rm commands.
Is there a way to use rm with an or keyword or pipe it through grep?

Any help greatly appreciated.
Start Free Trial
[+][-]07.13.2008 at 05:32PM PDT, ID: 21994932

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Bourne-Again Shell (bash), Perl Programming Language
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.13.2008 at 05:35PM PDT, ID: 21994940

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.13.2008 at 05:44PM PDT, ID: 21994966

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.13.2008 at 05:47PM PDT, ID: 21994976

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.13.2008 at 05:47PM PDT, ID: 21994977

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.13.2008 at 05:48PM PDT, ID: 21994980

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.13.2008 at 05:49PM PDT, ID: 21994982

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628