# Find a string in a path

**URL:** <https://community.unix.com/t/find-a-string-in-a-path/339427>\
**Category:** Linux\
**Created:** [February 6, 2014, 5:47am UTC](https://community.unix.com/t/find-a-string-in-a-path/339427 "2014-02-06T05:47:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikash163](https://community.unix.com/letter_avatar/vikash163/32/5_5575768a8748004e209b776fc1b2916d.png) [@Vikash163](https://community.unix.com/u/Vikash163)\
**Post date:** [February 6, 2014, 5:47am UTC](https://community.unix.com/t/find-a-string-in-a-path/339427/1 "2014-02-06T05:47:05Z")

</div>

Hi All,

I am trying to find a particular string in a path, but able to do so.  
I tried through grep command but its taking so long time which is not appropriate.

e.g:  
Path : /oct/oracle/apps/OMEC/appl/xxaterp/1.0/reports/US/

Suppose in this path we have 10 .rdf file and I want to search a particular string i.e. XXATARCUST\_TABLE (custom table name) where ever used in that path i.e. in any rdf or file. I want name of that file/rdf in which that string is present.

Please any one help on this.

Thanks,  
VKS

---

<div class="post-metadata">

**Author:** ![bartus11](https://community.unix.com/user_avatar/community.unix.com/bartus11/32/1418_2.png) [@bartus11](https://community.unix.com/u/bartus11)\
**Post date:** [February 6, 2014, 6:18am UTC](https://community.unix.com/t/find-a-string-in-a-path/339427/2 "2014-02-06T06:18:33Z")

</div>

Try:

```nohighlight
grep -l XXATARCUST_TABLE /oct/oracle/apps/OMEC/appl/xxaterp/1.0/reports/US/*.rdf

```

---

<div class="post-metadata">

**Author:** ![Vikash163](https://community.unix.com/letter_avatar/vikash163/32/5_5575768a8748004e209b776fc1b2916d.png) [@Vikash163](https://community.unix.com/u/Vikash163)\
**Post date:** [February 7, 2014, 8:30am UTC](https://community.unix.com/t/find-a-string-in-a-path/339427/3 "2014-02-07T08:30:42Z")

</div>

Thnx for reply but grep is taking so long time to fetch the data.  
Can we achieve this by "awk" command....whose performance  
is also good. Please help me on this.

Thanks,  
Vks
