<?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 Re: Searching an IP Address in one of the file from the whole system in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725947#M655413</link>
    <description>Hi (again) Vimal:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Dennis:  Another problem with ";" and grep is the fact that grep won't tell you the name of the file, since there is only one. Perhaps that's why Jai added -print to the end.&lt;BR /&gt;&lt;BR /&gt;That's a good point.   It's probably clearer (if for whatever reason one uses the ';' terminator to process one argument at a time) to do:&lt;BR /&gt;&lt;BR /&gt;# find / -type f -exec grep -e "string1" /dev/null {} \;&lt;BR /&gt;&lt;BR /&gt;When 'grep' sees two file arguments it shows any matches with the file name for identification.  Of course nothing will ever match the empty '/dev/null'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 15 Dec 2010 12:45:47 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2010-12-15T12:45:47Z</dc:date>
    <item>
      <title>Searching an IP Address in one of the file from the whole system</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725939#M655405</link>
      <description>Dear all,&lt;BR /&gt;&lt;BR /&gt;I have to find out one IP Address which is configured in a file. This file I'm not aware &amp;amp; can be placed in any directory or sub-directory in the System&lt;BR /&gt;OS is HPUX 11iv1.&lt;BR /&gt;I could not find any option in "grep" with recursive search.&lt;BR /&gt;&lt;BR /&gt;Please advise.&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;Vimal Upreti</description>
      <pubDate>Tue, 14 Dec 2010 04:39:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725939#M655405</guid>
      <dc:creator>ESS IITC</dc:creator>
      <dc:date>2010-12-14T04:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Searching an IP Address in one of the file from the whole system</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725940#M655406</link>
      <description>&amp;gt;I could not find any option in "grep" with recursive search.&lt;BR /&gt;&lt;BR /&gt;You can combine find(1) with grep(1):&lt;BR /&gt;find / -exec grep -e "string1" +&lt;BR /&gt;&lt;BR /&gt;The "-exec ... +" allows you to search lots of files at one invocation.</description>
      <pubDate>Tue, 14 Dec 2010 05:39:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725940#M655406</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-12-14T05:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Searching an IP Address in one of the file from the whole system</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725941#M655407</link>
      <description>find / -type f -exec grep -e "string" {} \;</description>
      <pubDate>Tue, 14 Dec 2010 05:48:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725941#M655407</guid>
      <dc:creator>kemo</dc:creator>
      <dc:date>2010-12-14T05:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Searching an IP Address in one of the file from the whole system</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725942#M655408</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can use &lt;BR /&gt;find / -type f -exec grep "&lt;STRING&gt;" {} \; -print&lt;BR /&gt;&lt;BR /&gt;Jai.&lt;BR /&gt;&lt;A href="http://itmms.wordpress.com/" target="_blank"&gt;http://itmms.wordpress.com/&lt;/A&gt;&lt;/STRING&gt;</description>
      <pubDate>Tue, 14 Dec 2010 09:04:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725942#M655408</guid>
      <dc:creator>Jai Ganesh</dc:creator>
      <dc:date>2010-12-14T09:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Searching an IP Address in one of the file from the whole system</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725943#M655409</link>
      <description>HI:&lt;BR /&gt;&lt;BR /&gt;Don't use the '\;' terminator for find's '-exec'.  Doing so means that you spawn *one* process for *every* entity that 'find' passes along.&lt;BR /&gt;&lt;BR /&gt;Instead use the "+" terminator which signals the collection and bundling of very large number of arguments into a list that is passed to one or more spawned processes.&lt;BR /&gt;&lt;BR /&gt;For small numbers of arguments, you probably won't notice the impact.  In the case you are using, you will not only waste time but seriously degrade your system performance if you use '\;' instead of '+'.&lt;BR /&gt;&lt;BR /&gt;Dennis meant to write:&lt;BR /&gt;&lt;BR /&gt;# find / -exec grep -e "string1" {} +&lt;BR /&gt;&lt;BR /&gt;...and most certainly meant to only examine files (and not directories too) by writing:&lt;BR /&gt;&lt;BR /&gt;# find / -type f -exec grep -e "string1" +&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF..&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Dec 2010 14:28:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725943#M655409</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-12-14T14:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Searching an IP Address in one of the file from the whole system</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725944#M655410</link>
      <description>HI:&lt;BR /&gt;&lt;BR /&gt;Don't use the '\;' terminator for find's '-exec'.  Doing so means that you spawn *one* process for *every* entity that 'find' passes along.&lt;BR /&gt;&lt;BR /&gt;Instead use the "+" terminator which signals the collection and bundling of very large number of arguments into a list that is passed to one or more spawned processes.&lt;BR /&gt;&lt;BR /&gt;For small numbers of arguments, you probably won't notice the impact.  In the case you are using, you will not only waste time but seriously degrade your system performance if you use '\;' instead of '+'.&lt;BR /&gt;&lt;BR /&gt;Dennis meant to write:&lt;BR /&gt;&lt;BR /&gt;# find / -exec grep -e "string1" {} +&lt;BR /&gt;&lt;BR /&gt;...and most certainly meant to only examine files (and not directories too) by writing:&lt;BR /&gt;&lt;BR /&gt;# find / -type f -exec grep -e "string1" {} +&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF..&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Dec 2010 14:28:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725944#M655410</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-12-14T14:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Searching an IP Address in one of the file from the whole system</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725945#M655411</link>
      <description>Dear Dennis Handly, kemo, Jai Ganesh, James R. Ferguson &lt;BR /&gt;&lt;BR /&gt;Thanks a lot for your quick solution. It worked:&lt;BR /&gt;# find / -exec grep -e "string1" {} +&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;Vimal</description>
      <pubDate>Tue, 14 Dec 2010 15:13:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725945#M655411</guid>
      <dc:creator>ESS IITC</dc:creator>
      <dc:date>2010-12-14T15:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Searching an IP Address in one of the file from the whole system</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725946#M655412</link>
      <description>&amp;gt;Thanks a lot for your quick solution. It worked:&lt;BR /&gt;&lt;BR /&gt;If you are happy with the answers you were given, please read the following about how to assign points:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;JRF: Don't use the '\;' terminator for find's -exec. &lt;BR /&gt;&lt;BR /&gt;Another problem with ";" and grep is the fact that grep won't tell you the name of the file, since there is only one.  Perhaps that's why Jai added -print to the end.</description>
      <pubDate>Tue, 14 Dec 2010 20:34:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725946#M655412</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-12-14T20:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Searching an IP Address in one of the file from the whole system</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725947#M655413</link>
      <description>Hi (again) Vimal:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Dennis:  Another problem with ";" and grep is the fact that grep won't tell you the name of the file, since there is only one. Perhaps that's why Jai added -print to the end.&lt;BR /&gt;&lt;BR /&gt;That's a good point.   It's probably clearer (if for whatever reason one uses the ';' terminator to process one argument at a time) to do:&lt;BR /&gt;&lt;BR /&gt;# find / -type f -exec grep -e "string1" /dev/null {} \;&lt;BR /&gt;&lt;BR /&gt;When 'grep' sees two file arguments it shows any matches with the file name for identification.  Of course nothing will ever match the empty '/dev/null'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Dec 2010 12:45:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/searching-an-ip-address-in-one-of-the-file-from-the-whole-system/m-p/4725947#M655413</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-12-15T12:45:47Z</dc:date>
    </item>
  </channel>
</rss>

