<?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: Find Command Not Finding Files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973250#M418364</link>
    <description>A. Clay has found the answer for me.</description>
    <pubDate>Wed, 12 Apr 2006 11:08:35 GMT</pubDate>
    <dc:creator>Monte Heeren</dc:creator>
    <dc:date>2006-04-12T11:08:35Z</dc:date>
    <item>
      <title>Find Command Not Finding Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973245#M418359</link>
      <description>Logged on as user root.&lt;BR /&gt;Directory contents:&lt;BR /&gt;/ifas/bsi/setup/perm/SPFMAPCK&lt;BR /&gt;/ifas/bsi/setup/perm/SPFMARBL&lt;BR /&gt;/ifas/bsi/setup/perm/SPFMARIN&lt;BR /&gt;/ifas/bsi/setup/perm/SPFMARSI&lt;BR /&gt;&lt;BR /&gt;Command: &lt;BR /&gt;find / -name SPFMA*&lt;BR /&gt;&lt;BR /&gt;The results:&lt;BR /&gt;/ifas/bsi/setup/perm/SPFMARIN.&lt;BR /&gt;&lt;BR /&gt;Only 1 file is returned.&lt;BR /&gt;&lt;BR /&gt;Do not understand why the find command will not return all 4 SPFMA* files. If I use&lt;BR /&gt;find / -name "SPFMA*", all 4 file name will be returned.&lt;BR /&gt;&lt;BR /&gt;Why does find / -name SPFMA* only return one file?&lt;BR /&gt;&lt;BR /&gt;Monte Heeren.  &lt;BR /&gt;</description>
      <pubDate>Tue, 11 Apr 2006 16:56:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973245#M418359</guid>
      <dc:creator>Monte Heeren</dc:creator>
      <dc:date>2006-04-11T16:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Find Command Not Finding Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973246#M418360</link>
      <description>This is a case of that stupid computer doing exactly what you are telling it too. The shell is expanding the '*' and you wantr find to do it. Essentially it's finding only SPFMARIN because that file is found in your current working directory.&lt;BR /&gt;&lt;BR /&gt;find / -name 'SPFMA*' &lt;BR /&gt;&lt;BR /&gt;will do what you want because the quotes prevent the shell from expanding the metacharacter.&lt;BR /&gt;&lt;BR /&gt;Also, you should avoid find from / because those can be very expensive operations.</description>
      <pubDate>Tue, 11 Apr 2006 17:00:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973246#M418360</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-04-11T17:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Find Command Not Finding Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973247#M418361</link>
      <description>Thank you for the response A. Clay.&lt;BR /&gt;&lt;BR /&gt;You were right.  There was a file in my root directory called SPFMARIN.  The result of the command only looked for the file&lt;BR /&gt;SPFMARIN in other directories.  Its like it stopped matching after if found the first match in the root directory.&lt;BR /&gt;&lt;BR /&gt;I'm still confused.&lt;BR /&gt;&lt;BR /&gt;When using the command:&lt;BR /&gt;  find / -name SPFMA*&lt;BR /&gt;&lt;BR /&gt;   if a file matches this expression in the&lt;BR /&gt;   root directory, the shell will stop &lt;BR /&gt;   matching file names and will continue to&lt;BR /&gt;   find only that file in other directories?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Monte.</description>
      <pubDate>Wed, 12 Apr 2006 10:31:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973247#M418361</guid>
      <dc:creator>Monte Heeren</dc:creator>
      <dc:date>2006-04-12T10:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Find Command Not Finding Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973248#M418362</link>
      <description>&lt;BR /&gt;This should make it clearer:&lt;BR /&gt;&lt;BR /&gt;Let's suppose that in your current working directory (it does not matter about the directories listed in the pathname list of the find command) you have the files "dogbone", "doggone", and "doghouse".&lt;BR /&gt;&lt;BR /&gt;When you enter:&lt;BR /&gt;&lt;BR /&gt;find / -name dog* &lt;BR /&gt;&lt;BR /&gt;what the find command actually sees after the shell expands the '*' metacharacter&lt;BR /&gt;is:&lt;BR /&gt;&lt;BR /&gt;find / -name dogbone doggone doghouse&lt;BR /&gt;&lt;BR /&gt;and this,in fact, is a syntax error for find because -name expects exactly one argument.&lt;BR /&gt;&lt;BR /&gt;If your current working directory only has the file "dogbone" in it then when you entered the same command find would actually see (with the same input as the first example):&lt;BR /&gt;&lt;BR /&gt;find / -name dogbone &lt;BR /&gt;&lt;BR /&gt;In this case, -name is supplied with exactly one argument so that it is not a syntax error but the ONLY file that fine will match is "dogbone".&lt;BR /&gt;&lt;BR /&gt;Now, consider the case of&lt;BR /&gt;&lt;BR /&gt;find / -name "dog*" &lt;BR /&gt;&lt;BR /&gt;In this case, regardless of the contents of your current working directory, what find sees is:&lt;BR /&gt;&lt;BR /&gt;find / -name dog* &lt;BR /&gt;&lt;BR /&gt;but notice that now the '*' is actually supplied to find itself so that it can do the pattern match. Any file in any directory that begins with "dog" is now found.&lt;BR /&gt;&lt;BR /&gt;You problem stems not from not understanding how the find command works but rather from not understanding how the shell works.</description>
      <pubDate>Wed, 12 Apr 2006 11:01:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973248#M418362</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-04-12T11:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Find Command Not Finding Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973249#M418363</link>
      <description>A. Clay.&lt;BR /&gt;I understand now!  Thank you for explaining it to me.  I need to understand that the shell has a mind of its own!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Monte.</description>
      <pubDate>Wed, 12 Apr 2006 11:07:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973249#M418363</guid>
      <dc:creator>Monte Heeren</dc:creator>
      <dc:date>2006-04-12T11:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Find Command Not Finding Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973250#M418364</link>
      <description>A. Clay has found the answer for me.</description>
      <pubDate>Wed, 12 Apr 2006 11:08:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-finding-files/m-p/4973250#M418364</guid>
      <dc:creator>Monte Heeren</dc:creator>
      <dc:date>2006-04-12T11:08:35Z</dc:date>
    </item>
  </channel>
</rss>

