<?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: What's wrong with this FIND command? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313347#M638129</link>
    <description>$ find /etc ! -group sys -exec ls -ld {} \; 2&amp;gt;/dev/null | wc -l&lt;BR /&gt;727&lt;BR /&gt;$ find /etc -group sys -exec ls -ld {} \; 2&amp;gt;/dev/null | wc -l&lt;BR /&gt;432&lt;BR /&gt;$ find /etc -exec ls -ld {} \; 2&amp;gt;/dev/null | wc -l&lt;BR /&gt;1159&lt;BR /&gt;$ expr 727 + 432&lt;BR /&gt;1159&lt;BR /&gt;&lt;BR /&gt;=&amp;gt; works perfectly here...&lt;BR /&gt;&lt;BR /&gt;could you do "ls -n" (no gid convertion in output) and a "grep oradvlp /etc/group" ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
    <pubDate>Wed, 23 Jun 2004 12:03:32 GMT</pubDate>
    <dc:creator>Fred Ruffet</dc:creator>
    <dc:date>2004-06-23T12:03:32Z</dc:date>
    <item>
      <title>What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313344#M638126</link>
      <description>I am trying to find all files whose "group" is NOT oradvlp.  What is wrong with this?:&lt;BR /&gt;&lt;BR /&gt;find $DATADIR ! -group oradvlp -exec ls -l {} \;&lt;BR /&gt;&lt;BR /&gt;It returns such lines as:&lt;BR /&gt;-rw-r-----   1 sched      oradvlp       1222 Feb 13  2003 wires.dat021306.gz&lt;BR /&gt;-rw-r--r--   1 sched      oradvlp       3833 Dec 11  2002 wires.dat121009.gz&lt;BR /&gt;-rw-r-----   1 sched      oradvlp        910 Dec 11  2002 wires.dat121209.gz&lt;BR /&gt;&lt;BR /&gt;I know that the group id is a number, but when "ls" translates it back, doesn't it use that to find the group name in /etc/group?</description>
      <pubDate>Wed, 23 Jun 2004 11:51:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313344#M638126</guid>
      <dc:creator>Don Bentz</dc:creator>
      <dc:date>2004-06-23T11:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313345#M638127</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try this &lt;BR /&gt;find $DATADIR -type f  ! -group oradvlp -exec ls -l {} \;&lt;BR /&gt;&lt;BR /&gt;In your command you see files under directory, which doesn't belong to group oradvlp&lt;BR /&gt;&lt;BR /&gt;In order to see only directories use &lt;BR /&gt;-type d and ls -ld {} \;&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Wed, 23 Jun 2004 12:00:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313345#M638127</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2004-06-23T12:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313346#M638128</link>
      <description>&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;find $DATADIR ! -group oradvlp -print | xargs ls -l {} \;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Wed, 23 Jun 2004 12:00:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313346#M638128</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-06-23T12:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313347#M638129</link>
      <description>$ find /etc ! -group sys -exec ls -ld {} \; 2&amp;gt;/dev/null | wc -l&lt;BR /&gt;727&lt;BR /&gt;$ find /etc -group sys -exec ls -ld {} \; 2&amp;gt;/dev/null | wc -l&lt;BR /&gt;432&lt;BR /&gt;$ find /etc -exec ls -ld {} \; 2&amp;gt;/dev/null | wc -l&lt;BR /&gt;1159&lt;BR /&gt;$ expr 727 + 432&lt;BR /&gt;1159&lt;BR /&gt;&lt;BR /&gt;=&amp;gt; works perfectly here...&lt;BR /&gt;&lt;BR /&gt;could you do "ls -n" (no gid convertion in output) and a "grep oradvlp /etc/group" ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jun 2004 12:03:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313347#M638129</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-06-23T12:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313348#M638130</link>
      <description>Well, your solutions take care of the problem although I am still uncertain what is wrong with the original version.  I guess I'll just be happy with the solution until I get a chance to review the lengthy "man" page when I have a day or so to digest it.  Thanks again.</description>
      <pubDate>Wed, 23 Jun 2004 12:05:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313348#M638130</guid>
      <dc:creator>Don Bentz</dc:creator>
      <dc:date>2004-06-23T12:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313349#M638131</link>
      <description>Note - the reason to use xargs instead of exec is right in the man page for find:&lt;BR /&gt;&lt;BR /&gt;           Note that output from find was piped to xargs(1) instead of using&lt;BR /&gt;           the -exec primary.  This is because when a large number of files&lt;BR /&gt;           or directories is to be processed by a single command, the -exec&lt;BR /&gt;           primary spawns a separate process for each file or directory,&lt;BR /&gt;           whereas xargs collects file names or directory names into&lt;BR /&gt;           multiple arguments to a single chmod command, resulting in fewer&lt;BR /&gt;           processes and greater system efficiency. &lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Wed, 23 Jun 2004 12:08:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313349#M638131</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-06-23T12:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313350#M638132</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;  I would go with what Victor has suggested. &lt;BR /&gt;&lt;BR /&gt;  The filenames in the output doesnt include any directory name so I assume these files belong to the directory that is NOT owned by group oradvlp.&lt;BR /&gt;&lt;BR /&gt;  # find $DATADIR ! -group oradvlp -exec ls -ld {} \;&lt;BR /&gt;&lt;BR /&gt;-- Sundar.</description>
      <pubDate>Wed, 23 Jun 2004 12:08:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313350#M638132</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-06-23T12:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313351#M638133</link>
      <description>what is wrong with the original command is, it did not discriminate between files and directories, hence . (dot) character is included in the files to find expansion. When you executed an ls -l on the current directory, you have received the files which you were trying to exclude by ! -group phrase.&lt;BR /&gt;&lt;BR /&gt;Hope this helps explaining the situation.</description>
      <pubDate>Wed, 23 Jun 2004 12:08:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313351#M638133</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2004-06-23T12:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313352#M638134</link>
      <description>Thanks, Geoff.  I am always concerned about the amount of overhead associated with "find".</description>
      <pubDate>Wed, 23 Jun 2004 12:10:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313352#M638134</guid>
      <dc:creator>Don Bentz</dc:creator>
      <dc:date>2004-06-23T12:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313353#M638135</link>
      <description>I think Victor is the one ! :)&lt;BR /&gt;&lt;BR /&gt;The directory that contains the files is probably not owned by group oradvlp. When you issue "ls -l" on it, you see those files.&lt;BR /&gt;&lt;BR /&gt;If you only want files, use Victor's solution. If you want directories too, use "ls -ld" instead of "ls -l" (directory will be shown instead of their content)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jun 2004 12:11:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313353#M638135</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-06-23T12:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313354#M638136</link>
      <description>Sundar, that is correct.  The filenames returned are in $DATADIR, not in a subdirectory.&lt;BR /&gt;&lt;BR /&gt;BTW.  I don't want to consume any more of your (collectively) time on this, so...&lt;BR /&gt;Thanks again.</description>
      <pubDate>Wed, 23 Jun 2004 12:13:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/3313354#M638136</guid>
      <dc:creator>Don Bentz</dc:creator>
      <dc:date>2004-06-23T12:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this FIND command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/5671439#M638137</link>
      <description>&lt;P&gt;&amp;gt;the reason to use xargs instead of exec is right in the man page for find:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no need to use xargs when you can use the even faster -exec ... +:&lt;/P&gt;&lt;P&gt;find $DATADIR ! -group oradvlp -exec&amp;nbsp; ls -ld {} +&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2012 09:05:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-s-wrong-with-this-find-command/m-p/5671439#M638137</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-05-28T09:05:35Z</dc:date>
    </item>
  </channel>
</rss>

