<?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: Search in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303719#M338385</link>
    <description>grep works&lt;BR /&gt;&lt;BR /&gt;the examples using find are trying to find the requested pattern in the filenames themselves.  The original request was "within the files"</description>
    <pubDate>Tue, 11 Nov 2008 20:53:08 GMT</pubDate>
    <dc:creator>OldSchool</dc:creator>
    <dc:date>2008-11-11T20:53:08Z</dc:date>
    <item>
      <title>Search</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303714#M338380</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Suppose I have a directory and inside it 2000 files are present. Now my question how to search any pattern or word in all files in one stroke through command line..&lt;BR /&gt;&lt;BR /&gt;Reagrds&lt;BR /&gt;Rkumar</description>
      <pubDate>Tue, 11 Nov 2008 06:26:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303714#M338380</guid>
      <dc:creator>Waugh</dc:creator>
      <dc:date>2008-11-11T06:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Search</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303715#M338381</link>
      <description>Well you can use grep:&lt;BR /&gt;grep regular-expression *</description>
      <pubDate>Tue, 11 Nov 2008 06:44:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303715#M338381</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-11-11T06:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Search</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303716#M338382</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Few examples&lt;BR /&gt;&lt;BR /&gt;#grep email /tmp/* -&amp;gt; will list the lines containing the word "email" from all files in /tmp dir&lt;BR /&gt;&lt;BR /&gt;#grep -i email /tmp/* -&amp;gt; Case sensitive search&lt;BR /&gt;&lt;BR /&gt;#grep -c email /tmp/* -&amp;gt; list the no of lines in each file containing the word "email"&lt;BR /&gt;&lt;BR /&gt;#grep "email doc" /tmp/* -&amp;gt; To search multiple words&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Nov 2008 07:52:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303716#M338382</guid>
      <dc:creator>Ganesan R</dc:creator>
      <dc:date>2008-11-11T07:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Search</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303717#M338383</link>
      <description>&lt;BR /&gt;run the following from root&lt;BR /&gt;&lt;BR /&gt;find . -name &lt;FILENAME&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Tue, 11 Nov 2008 19:56:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303717#M338383</guid>
      <dc:creator>Grayh</dc:creator>
      <dc:date>2008-11-11T19:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303718#M338384</link>
      <description>Command is:&lt;BR /&gt;find /&lt;DIR&gt; -name * | grep &lt;SEARCHSTRING&gt;&lt;/SEARCHSTRING&gt;&lt;/DIR&gt;</description>
      <pubDate>Tue, 11 Nov 2008 20:47:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303718#M338384</guid>
      <dc:creator>Adam W.</dc:creator>
      <dc:date>2008-11-11T20:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Search</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303719#M338385</link>
      <description>grep works&lt;BR /&gt;&lt;BR /&gt;the examples using find are trying to find the requested pattern in the filenames themselves.  The original request was "within the files"</description>
      <pubDate>Tue, 11 Nov 2008 20:53:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303719#M338385</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2008-11-11T20:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Search</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303720#M338386</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;As noted, a simple:&lt;BR /&gt;&lt;BR /&gt;# cd /path; grep regexp *&lt;BR /&gt;&lt;BR /&gt;...would work as long as the shell doesn't expand the "*" into a list of filenames that exceeds the maximum argument size.&lt;BR /&gt;&lt;BR /&gt;It is also assumed that the directory contains only "text" (Ascii) files and not binary ones (e.g. executables) that will write garbage to your terminal.&lt;BR /&gt;&lt;BR /&gt;If you want to examine a directory and its subordinate directories:&lt;BR /&gt;&lt;BR /&gt;# find /path -type f -exec grep -i local /dev/null {} +&lt;BR /&gt;&lt;BR /&gt;...is useful.  This looks at only files (not directories) and examines each file for a pattern "local".  The addition of the '/dev/null' forces the output to include the filename along with the matching line regardless of how many different files are found with matches.  The "+" terminator (instead of "\;") makes the operation quite performance conservative.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Nov 2008 21:14:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303720#M338386</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-11-11T21:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Search</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303721#M338387</link>
      <description>And to build on the James solution:&lt;BR /&gt;# find /path -type f -maxdepth 1 -exec grep -i local /dev/null {} +&lt;BR /&gt;&lt;BR /&gt;The maxdepth will only stay in the directory that you have specified and not the subdirectories. I really don't know if you need the /dev/null. But else the command on a linux or debian would be:&lt;BR /&gt;&lt;BR /&gt;# find /path -type f -maxdepth 1 -exec grep -i local {} +&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Nov 2008 23:04:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303721#M338387</guid>
      <dc:creator>Jannik</dc:creator>
      <dc:date>2008-11-11T23:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Search</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303722#M338388</link>
      <description>Hi Rkumar,&lt;BR /&gt;&lt;BR /&gt;I used to do &lt;BR /&gt;&lt;BR /&gt;$cd /directory&lt;BR /&gt;$grep string * #(if u r string is abc it will look for abc (small letter) only)&lt;BR /&gt;or&lt;BR /&gt;$grep -i string * #(in this case it will search abc as well as ABC also)&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Wed, 12 Nov 2008 03:26:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303722#M338388</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2008-11-12T03:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Search</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303723#M338389</link>
      <description>Hi,&lt;BR /&gt;grep -i &lt;PATTERN&gt; $(file *|grep text|cut -d":" -f1)&lt;BR /&gt;&lt;BR /&gt;this will search for &lt;PATTERN&gt; in all the text file sin teh directory&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art&lt;/PATTERN&gt;&lt;/PATTERN&gt;</description>
      <pubDate>Wed, 12 Nov 2008 11:14:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search/m-p/4303723#M338389</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2008-11-12T11:14:28Z</dc:date>
    </item>
  </channel>
</rss>

