![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem with grep on search string in a txt file over multiple files | m00 | UNIX for Dummies Questions & Answers | 2 | 05-18-2008 11:21 AM |
| Recursicely search and rename file extension | riverside | Shell Programming and Scripting | 7 | 04-11-2008 07:02 AM |
| Search for all the unique file extension | riverside | Shell Programming and Scripting | 1 | 04-09-2008 01:47 PM |
| File extension search and copy | bsandeep_80 | UNIX for Advanced & Expert Users | 20 | 04-04-2008 07:19 AM |
| appending string to text file based on search string | malaymaru | Shell Programming and Scripting | 1 | 06-09-2006 05:53 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
string search in folders with particular multiple file extension
Hi,
I am newbie in UNIX so please excuse for my questions. Is there a a way to search for string in files within folder and sub folder in particluar file extensions. Ex. search for ABC in folder 'A'(including it's sub folders) in html, xml files. Thanks, Ani |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
find /folder/path -name "*.html" -or -name "*.xml" | xargs grep ABC
or, if you run into errors due to space characters in the filename: find /folder/path -name "*.html" -or -name "*.xml" -print0 | xargs -0 grep ABC man find for more info |
|
#3
|
|||
|
|||
|
Thanks vertigo23.
Thanks vertigo23
|
|||
| Google The UNIX and Linux Forums |