<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Help Needed on Find in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021558#M93560</link>
    <description>Hi all, &lt;BR /&gt;&lt;BR /&gt;I am searching a string using &lt;BR /&gt;find /interfaces/eu3/hmsl/italy/it10archive -xdev -exec grep -l 'string' {} \;. &lt;BR /&gt;&lt;BR /&gt;I want to restrict the search only to that particular dir but find command finds the string in /interfaces/eu3/hmsl dir as well. &lt;BR /&gt;&lt;BR /&gt;Is there any alternative to restrict the search for particular dir. &lt;BR /&gt;&lt;BR /&gt;Thanks in advance. &lt;BR /&gt;&lt;BR /&gt;Ta &lt;BR /&gt;Yogesh</description>
    <pubDate>Sun, 17 Jun 2007 16:19:42 GMT</pubDate>
    <dc:creator>yogesh_4</dc:creator>
    <dc:date>2007-06-17T16:19:42Z</dc:date>
    <item>
      <title>Help Needed on Find</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021558#M93560</link>
      <description>Hi all, &lt;BR /&gt;&lt;BR /&gt;I am searching a string using &lt;BR /&gt;find /interfaces/eu3/hmsl/italy/it10archive -xdev -exec grep -l 'string' {} \;. &lt;BR /&gt;&lt;BR /&gt;I want to restrict the search only to that particular dir but find command finds the string in /interfaces/eu3/hmsl dir as well. &lt;BR /&gt;&lt;BR /&gt;Is there any alternative to restrict the search for particular dir. &lt;BR /&gt;&lt;BR /&gt;Thanks in advance. &lt;BR /&gt;&lt;BR /&gt;Ta &lt;BR /&gt;Yogesh</description>
      <pubDate>Sun, 17 Jun 2007 16:19:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021558#M93560</guid>
      <dc:creator>yogesh_4</dc:creator>
      <dc:date>2007-06-17T16:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed on Find</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021559#M93561</link>
      <description>Hi Yogesh:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Is there any alternative to restrict the search for particular dir. &lt;BR /&gt;&lt;BR /&gt;If you mean not to recursively descend within the starting directory, then:&lt;BR /&gt;&lt;BR /&gt;# cd /desired_path&lt;BR /&gt;&lt;BR /&gt;# find . -type f ! -path "./*/*" -exec grep -l 'string' {} \;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 17 Jun 2007 16:59:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021559#M93561</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-06-17T16:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed on Find</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021560#M93562</link>
      <description>Hi Yogesh,&lt;BR /&gt;find /interfaces/eu3/hmsl/italy/it10archive -xdev -prune -exec grep -l 'string' {} \;&lt;BR /&gt;&lt;BR /&gt;-prune should be your fried in this&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Jun 2007 02:38:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021560#M93562</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-06-18T02:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed on Find</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021561#M93563</link>
      <description>find /interfaces/eu3/hmsl/italy/it10archive -xdev -exec grep -l 'string' {} \;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I want to restrict the search only to that particular dir but find command finds the string in /interfaces/eu3/hmsl dir as well.&lt;BR /&gt;&lt;BR /&gt;I'm not sure how it finds in hmsl, when that directory is the grandparent of the starting directory?&lt;BR /&gt;&lt;BR /&gt;Also you should change "{} \;" to "{} +".</description>
      <pubDate>Mon, 18 Jun 2007 07:20:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021561#M93563</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-06-18T07:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed on Find</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021562#M93564</link>
      <description>Hi (again) Yogesh:&lt;BR /&gt;&lt;BR /&gt;Upon rereading, I noticed that you say that the "...find command finds the string in /interfaces/eu3/hmsl dir as well."&lt;BR /&gt;&lt;BR /&gt;Including the '-type f' as I suggested should eliminate finding symbolic links if that is indeed a problem.&lt;BR /&gt;&lt;BR /&gt;Too, if you do not want to chase symbolic links, add "! -follow" to your 'find' expressions.&lt;BR /&gt;&lt;BR /&gt;Adding '-xdev' is extremely important if/when you do not want to cross mountpoints; most notably if/when you are searching the root ('/') directory.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Jun 2007 07:54:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-needed-on-find/m-p/4021562#M93564</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-06-18T07:54:57Z</dc:date>
    </item>
  </channel>
</rss>

