<?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: Problems with find in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281747#M180540</link>
    <description>Many thanks for the prompt replies. I'm trying out a couple of the suggestions now.&lt;BR /&gt;&lt;BR /&gt;I will be sorting out the points problem from my previous post very soon.&lt;BR /&gt;&lt;BR /&gt;The user in question is currently set at UID 99, and I'm looking to increase the UID to 199</description>
    <pubDate>Thu, 20 May 2004 02:55:48 GMT</pubDate>
    <dc:creator>Pete Kelly</dc:creator>
    <dc:date>2004-05-20T02:55:48Z</dc:date>
    <item>
      <title>Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281740#M180533</link>
      <description>Hi there..&lt;BR /&gt;&lt;BR /&gt;I am using the find command to search in a specific directory for files owned by a user. &lt;BR /&gt;"find /(dir) -user (user) -print -exec ls -l {} \; &amp;gt; /tmp/file" is the command i'm using.&lt;BR /&gt;&lt;BR /&gt;When I check the /tmp/file file, there are files in there that are owned by root! not just the (user) user.&lt;BR /&gt;&lt;BR /&gt;If I replace the ls -l with a chown (newuser), the files belonging to root would be chown'd to the newuser.    &lt;BR /&gt;&lt;BR /&gt;Am I having a "blonde moment" here... HELP</description>
      <pubDate>Thu, 20 May 2004 02:32:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281740#M180533</guid>
      <dc:creator>Pete Kelly</dc:creator>
      <dc:date>2004-05-20T02:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281741#M180534</link>
      <description>try:&lt;BR /&gt;&lt;BR /&gt;# find /&lt;DIR&gt; -user &lt;USERNAME&gt; -exec ls -ld {} \;&lt;BR /&gt;e.g.&lt;BR /&gt;# find /tmp/ -user root -exec ls -ld {} \;&lt;BR /&gt;&lt;BR /&gt;the above will only show the files belonging to the specified username or UID. check if UID of root is co-own by another users.&lt;BR /&gt;&lt;BR /&gt;# logins -u&lt;BR /&gt;&lt;BR /&gt;regards.&lt;/USERNAME&gt;&lt;/DIR&gt;</description>
      <pubDate>Thu, 20 May 2004 02:40:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281741#M180534</guid>
      <dc:creator>Joseph Loo</dc:creator>
      <dc:date>2004-05-20T02:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281742#M180535</link>
      <description>Try Executing this one, i have tested and it works:&lt;BR /&gt;&lt;BR /&gt;find /dir) -user (user) -print &amp;gt; /tmp/file&lt;BR /&gt;&lt;BR /&gt;No need for exec.&lt;BR /&gt;&lt;BR /&gt;Hope that helps.&lt;BR /&gt;Regards&lt;BR /&gt;</description>
      <pubDate>Thu, 20 May 2004 02:41:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281742#M180535</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-05-20T02:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281743#M180536</link>
      <description>What is the user's UID ?. Is it "0" (zero) ?.&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Thu, 20 May 2004 02:41:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281743#M180536</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2004-05-20T02:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281744#M180537</link>
      <description>by the way, I think you have forgotten your promise to assign points for the previous post, &lt;PROMISCUOUS mode=""&gt;.&lt;BR /&gt;&lt;BR /&gt;regards.&lt;/PROMISCUOUS&gt;</description>
      <pubDate>Thu, 20 May 2004 02:43:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281744#M180537</guid>
      <dc:creator>Joseph Loo</dc:creator>
      <dc:date>2004-05-20T02:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281745#M180538</link>
      <description>My guess would be that there's on or more subdirectories that are owned by your user, and that when the ls is executed, it does an ls on that subdirectory, displaying the entire contents.&lt;BR /&gt;&lt;BR /&gt;Try&lt;BR /&gt;&lt;BR /&gt;find /dir -user (user) -type f -exec ls -l {} \;</description>
      <pubDate>Thu, 20 May 2004 02:46:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281745#M180538</guid>
      <dc:creator>Chris Wilshaw</dc:creator>
      <dc:date>2004-05-20T02:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281746#M180539</link>
      <description>Have a look at /etc/passwd file and look for 3rd field  UID of the users. Have you by mistake given UID 0 to any other users?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;</description>
      <pubDate>Thu, 20 May 2004 02:49:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281746#M180539</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-05-20T02:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281747#M180540</link>
      <description>Many thanks for the prompt replies. I'm trying out a couple of the suggestions now.&lt;BR /&gt;&lt;BR /&gt;I will be sorting out the points problem from my previous post very soon.&lt;BR /&gt;&lt;BR /&gt;The user in question is currently set at UID 99, and I'm looking to increase the UID to 199</description>
      <pubDate>Thu, 20 May 2004 02:55:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281747#M180540</guid>
      <dc:creator>Pete Kelly</dc:creator>
      <dc:date>2004-05-20T02:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281748#M180541</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I think, the problem is in ls -l:&lt;BR /&gt;Your find gives you not only files but directories as well. If in a directory, which belongs to the (user) there are files which belongs to root, you see them in the output.&lt;BR /&gt;Add additional option into your find command:&lt;BR /&gt;find (dir) -type f  &lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Thu, 20 May 2004 03:43:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281748#M180541</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2004-05-20T03:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281749#M180542</link>
      <description>Try this&lt;BR /&gt;find /(dir) -type f -user (user) -print &amp;gt; /tmp/file&lt;BR /&gt;HTH&lt;BR /&gt;Bruno</description>
      <pubDate>Thu, 20 May 2004 04:31:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281749#M180542</guid>
      <dc:creator>Bruno Ganino</dc:creator>
      <dc:date>2004-05-20T04:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281750#M180543</link>
      <description>Hi,&lt;BR /&gt;UID should be normally be above 100 because below 100 they are supposed to be used by System.&lt;BR /&gt;&lt;BR /&gt;Hope that helps.&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 20 May 2004 06:30:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281750#M180543</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-05-20T06:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281751#M180544</link>
      <description>Many thanks for all your replies to this query. As it turns out, I've been going up a blind alley. The UID's in question need to be kept as they are for application functionality. I'll be assigning points soon</description>
      <pubDate>Fri, 21 May 2004 03:52:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281751#M180544</guid>
      <dc:creator>Pete Kelly</dc:creator>
      <dc:date>2004-05-21T03:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281752#M180545</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;just in case you ever do change the UID of a user you will need to do a recursive change of owner to the files they own too.&lt;BR /&gt;&lt;BR /&gt;:-) John.</description>
      <pubDate>Fri, 21 May 2004 04:08:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281752#M180545</guid>
      <dc:creator>John Carr_2</dc:creator>
      <dc:date>2004-05-21T04:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281753#M180546</link>
      <description>Hi Pete;&lt;BR /&gt;&lt;BR /&gt;I think what is happening is that the find command has encountered a directory owned by (user) that in fact contains files owned by root.&lt;BR /&gt;&lt;BR /&gt;ie.&lt;BR /&gt;".... -exec ls -l {}"&lt;BR /&gt;&lt;BR /&gt;means do a long listing on whatever we just found (in this case a directory). Similar to if you had typed "ls -l /var".&lt;BR /&gt;&lt;BR /&gt;I am not sure, but I think a chown will work as intended provided you don't use the "-R" option. However, I would test the new chown version on junk/test files first, before releasing it on unsuspecting important files.</description>
      <pubDate>Fri, 21 May 2004 09:25:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281753#M180546</guid>
      <dc:creator>Kelsey Petrychyn</dc:creator>
      <dc:date>2004-05-21T09:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281754#M180547</link>
      <description>Pete,&lt;BR /&gt;&lt;BR /&gt;Try using the find command with egrep -v to cull out the files owned by root.  This will work whether the userid you are searching on shares the uid of 0 with root or not.&lt;BR /&gt;&lt;BR /&gt;For example&lt;BR /&gt;find . -user ingres -type f -exec ls -l {} \; | egrep -v root&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Rossco</description>
      <pubDate>Fri, 21 May 2004 21:39:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-find/m-p/3281754#M180547</guid>
      <dc:creator>Ross Barton</dc:creator>
      <dc:date>2004-05-21T21:39:56Z</dc:date>
    </item>
  </channel>
</rss>

