![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| shell script to search content of file with timestamps in the directory | psychobeauty | Shell Programming and Scripting | 10 | 04-21-2008 02:37 AM |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 07:24 AM |
| grep/cat/more -- search in a txt file and display content from a specific "keyword" | I-1 | UNIX for Dummies Questions & Answers | 4 | 02-21-2007 01:57 AM |
| How to search files containing a specific word in the content | amjath78 | UNIX for Dummies Questions & Answers | 1 | 01-03-2007 12:42 PM |
| Advanced Search Problems.. Search by User Name | Neo | Post Here to Contact Site Administrators and Moderators | 1 | 05-18-2003 09:28 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Search files with specfic extention and later search content
Hi,
I would appriciate if somebody can help me figure out how to search for all the *.xml file under a specific directory and subdirectroies (/home/username) and later search of content "<start>" inside the xml file returned by search. -Lovin.V |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Code:
find /home/username -name '*.xml' -exec grep '<start>' {} +
Code:
find /home/username -name '*.xml'|xargs grep '<start>' Code:
find /home/username -name '*.xml' -exec grep '<start>' {} \; -print
|
|
#3
|
|||
|
|||
|
Awesome.. You nailed it.
Thanks, Lovin.V |
|||
| Google The UNIX and Linux Forums |