<?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 check files for embedded code. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/check-files-for-embedded-code/m-p/4705688#M659451</link>
    <description>Im trying to find a way to check a folder that contains 100 directories and 170,000 files, approx, it changes alot.&lt;BR /&gt;&lt;BR /&gt;I want to cat the file and grep for the word "include" and then list the file so I can see the permissions.&lt;BR /&gt;Is the best way to do a ls -1 at the root folder, cat every file and grep for 'include' ?&lt;BR /&gt;Then Im lost on how to display the file permissions of that file if it finds the word 'include'. stuck...&lt;BR /&gt;</description>
    <pubDate>Wed, 27 Oct 2010 11:23:04 GMT</pubDate>
    <dc:creator>Nobody's Hero</dc:creator>
    <dc:date>2010-10-27T11:23:04Z</dc:date>
    <item>
      <title>check files for embedded code.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-files-for-embedded-code/m-p/4705688#M659451</link>
      <description>Im trying to find a way to check a folder that contains 100 directories and 170,000 files, approx, it changes alot.&lt;BR /&gt;&lt;BR /&gt;I want to cat the file and grep for the word "include" and then list the file so I can see the permissions.&lt;BR /&gt;Is the best way to do a ls -1 at the root folder, cat every file and grep for 'include' ?&lt;BR /&gt;Then Im lost on how to display the file permissions of that file if it finds the word 'include'. stuck...&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Oct 2010 11:23:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-files-for-embedded-code/m-p/4705688#M659451</guid>
      <dc:creator>Nobody's Hero</dc:creator>
      <dc:date>2010-10-27T11:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: check files for embedded code.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-files-for-embedded-code/m-p/4705689#M659452</link>
      <description>Something like this should work:&lt;BR /&gt;&lt;BR /&gt;cd /somedir&lt;BR /&gt;find . -type f &amp;gt;&amp;gt; filelist&lt;BR /&gt;&lt;BR /&gt;for FILE in $(&amp;lt; filelist)&lt;BR /&gt;do&lt;BR /&gt;grep -iq include ${FILE} &amp;amp;&amp;amp; ls -l ${FILE}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The above will create your list of files, then the 'for' loop will loop through those files one at a time, look for 'include' in the file and if it finds it, do an 'ls -l' on the file.</description>
      <pubDate>Wed, 27 Oct 2010 12:23:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-files-for-embedded-code/m-p/4705689#M659452</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2010-10-27T12:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: check files for embedded code.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-files-for-embedded-code/m-p/4705690#M659453</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Patrick's solution is an excellent one.  I would change:&lt;BR /&gt;&lt;BR /&gt;# find . -type f &amp;gt;&amp;gt; filelist&lt;BR /&gt;&lt;BR /&gt;...to:&lt;BR /&gt;&lt;BR /&gt;# find . -type f &amp;gt; filelist&lt;BR /&gt;&lt;BR /&gt;...however, so that multiple invocations of the script don't mix new results into old ones.&lt;BR /&gt;&lt;BR /&gt;Remember that if you have multiple directories to search you can stack them like:&lt;BR /&gt;&lt;BR /&gt;# find /home /usr/local . -type f -print&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 27 Oct 2010 13:32:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-files-for-embedded-code/m-p/4705690#M659453</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-10-27T13:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: check files for embedded code.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-files-for-embedded-code/m-p/4705691#M659454</link>
      <description>&lt;!--!*#--&gt;&amp;gt;Patrick: for FILE in $(&amp;lt; filelist)&lt;BR /&gt;&lt;BR /&gt;Hmm, it appears this scheme isn't limited to ARG_MAX bytes, about 2 Mb.  I've just done 65 Mb.&lt;BR /&gt;&lt;BR /&gt;If you have more files than this, you'll need to use xargs or while:&lt;BR /&gt;find . -type f | while read FILE; do&lt;BR /&gt;  grep -iq include ${FILE} &amp;amp;&amp;amp; ls -l ${FILE}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Also if you don't want to find "included", you can add "-w" to the grep.</description>
      <pubDate>Thu, 28 Oct 2010 07:21:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-files-for-embedded-code/m-p/4705691#M659454</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-10-28T07:21:12Z</dc:date>
    </item>
  </channel>
</rss>

