<?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: finding filesystems with numeric UID in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887733#M102271</link>
    <description>Steve,&lt;BR /&gt;What does the expression below found in your script mean?:&lt;BR /&gt;oldDir = |o|&lt;BR /&gt;I'm getting errors like:&lt;BR /&gt;./uid-2.sh[3]: o:  not found.&lt;BR /&gt;Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] -e pattern_list...&lt;BR /&gt;        [-f pattern_file...] [file...]&lt;BR /&gt;Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] [-e pattern_list...]&lt;BR /&gt;        -f pattern_file... [file...]&lt;BR /&gt;Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] pattern_list [file...]&lt;BR /&gt;./uid-2.sh[6]: xx:  not found.&lt;BR /&gt;&lt;BR /&gt;Could you help me out?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
    <pubDate>Thu, 23 Jan 2003 06:12:45 GMT</pubDate>
    <dc:creator>Chern Jian Leaw</dc:creator>
    <dc:date>2003-01-23T06:12:45Z</dc:date>
    <item>
      <title>finding filesystems with numeric UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887726#M102264</link>
      <description>Hi,&lt;BR /&gt;I would like to search file filesystems belonging to a user being which is only represented by its numeric UID. i.e. UID=200. &lt;BR /&gt;&lt;BR /&gt;I've used the "find" utility to search for filesystems with UID=200:&lt;BR /&gt;#find / -user 200 -print &lt;BR /&gt;&lt;BR /&gt;However, I would only like to get all directories with UID=200, which are just 1-level down the search once UID=200 is encountered. &lt;BR /&gt;e.g:&lt;BR /&gt;In the filesystem:&lt;BR /&gt;/home/cs/pg/users/ken_lee/MARS/tools/&lt;BR /&gt;if the directory MARS already have an instance of UID=200, then I would like to print it. This is regardless of the depth of filesystem tree. &lt;BR /&gt;&lt;BR /&gt;Is there a way which I can specify the find utility to do so? &lt;BR /&gt;&lt;BR /&gt;Or if a script is needed for such a task, could someone kindly show me how's its to be done?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Jan 2003 11:14:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887726#M102264</guid>
      <dc:creator>Chern Jian Leaw</dc:creator>
      <dc:date>2003-01-22T11:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: finding filesystems with numeric UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887727#M102265</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;# find . -type d -user 200 -print&lt;BR /&gt;&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Wed, 22 Jan 2003 11:46:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887727#M102265</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2003-01-22T11:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: finding filesystems with numeric UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887728#M102266</link>
      <description>Hi&lt;BR /&gt;Need some clarification,in your example - &lt;BR /&gt;/home/cs/pg/users/ken_lee/MARS/tools is a mount point for filesystem?If so - MARS is not in this filesystem.What type of file are you &lt;BR /&gt;searching for (-type option of find)?If it's &lt;BR /&gt;a filesystem (and mounted) you can search with&lt;BR /&gt;find -type M (mounting point).For directories&lt;BR /&gt;use -type d.&lt;BR /&gt;&lt;BR /&gt;Zeev.</description>
      <pubDate>Wed, 22 Jan 2003 11:49:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887728#M102266</guid>
      <dc:creator>Zeev Schultz</dc:creator>
      <dc:date>2003-01-22T11:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: finding filesystems with numeric UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887729#M102267</link>
      <description>Chern&lt;BR /&gt;&lt;BR /&gt;Follow instructions above to find directories owned by UID 200. To trim the information down, do the following,...&lt;BR /&gt;&lt;BR /&gt;find etc etc &amp;gt;/tmp/findrslt&lt;BR /&gt;export LNCOUNT=`cat /tmp/findrslt|wc -l'&lt;BR /&gt;cat /dev/null &amp;gt;/tmp/outrslt&lt;BR /&gt;while (( $LNCOUNT &amp;gt; 0 ))&lt;BR /&gt;do&lt;BR /&gt;export LINE1=`head -n 1 /tmp/findrslt'&lt;BR /&gt;grep "^$LINE1 /tmp/findrslt |head -n 2" &amp;gt;&amp;gt;/tmp/outrslt&lt;BR /&gt;grep -v "^$LINE1" /tmp/findrslt &amp;gt;/tmp/findrslt2&lt;BR /&gt;mv /tmp/findrslt2 /tmp/findrslt&lt;BR /&gt;export LNCOUNT=`cat /tmp/findrslt|wc -l'&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Now you have the first 2 lines of every directory tree occurence of UID 200.&lt;BR /&gt;&lt;BR /&gt;Share and Enjoy! Ian</description>
      <pubDate>Wed, 22 Jan 2003 11:58:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887729#M102267</guid>
      <dc:creator>Ian Dennison_1</dc:creator>
      <dc:date>2003-01-22T11:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: finding filesystems with numeric UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887730#M102268</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As shown just add the -d and get them all.&lt;BR /&gt;&lt;BR /&gt;manually edit it afterwards.&lt;BR /&gt;&lt;BR /&gt;There is no comfortable way with a script or find to do this.&lt;BR /&gt;&lt;BR /&gt;You can play around with something like&lt;BR /&gt;&lt;BR /&gt;oldir=lol&lt;BR /&gt;find / -user 200 -type d 2&amp;gt;/dev/null|&lt;BR /&gt;while read line&lt;BR /&gt;do&lt;BR /&gt;xx=$(echo $line|grep -v $oldir)&lt;BR /&gt;if [ "$xx" != "" ]&lt;BR /&gt;then&lt;BR /&gt;ll -d $line&lt;BR /&gt;oldir=$line&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Which will give you 1 layer down and then use these addresses to get the next one.&lt;BR /&gt;&lt;BR /&gt;                       Regards&lt;BR /&gt;&lt;BR /&gt;                       Steve Steel&lt;BR /&gt;&lt;BR /&gt;Quote of the moment&lt;BR /&gt;-------------------&lt;BR /&gt;"We are drowning in information but starved for knowledge."&lt;BR /&gt;-- John Naisbitt&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Jan 2003 12:04:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887730#M102268</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2003-01-22T12:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: finding filesystems with numeric UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887731#M102269</link>
      <description>Hi Chern,&lt;BR /&gt;please try the attached script.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Wed, 22 Jan 2003 13:24:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887731#M102269</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-01-22T13:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: finding filesystems with numeric UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887732#M102270</link>
      <description>Zeev,&lt;BR /&gt;The mount point is /home/cs and I'm searching for files and directories having UID=200. However, for the case of directories, I'm only searching for the first instance of directories with UID=200. This is because all other directories beneath that directory having UID=200 also have the UIDs as 200.</description>
      <pubDate>Thu, 23 Jan 2003 02:43:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887732#M102270</guid>
      <dc:creator>Chern Jian Leaw</dc:creator>
      <dc:date>2003-01-23T02:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: finding filesystems with numeric UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887733#M102271</link>
      <description>Steve,&lt;BR /&gt;What does the expression below found in your script mean?:&lt;BR /&gt;oldDir = |o|&lt;BR /&gt;I'm getting errors like:&lt;BR /&gt;./uid-2.sh[3]: o:  not found.&lt;BR /&gt;Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] -e pattern_list...&lt;BR /&gt;        [-f pattern_file...] [file...]&lt;BR /&gt;Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] [-e pattern_list...]&lt;BR /&gt;        -f pattern_file... [file...]&lt;BR /&gt;Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] pattern_list [file...]&lt;BR /&gt;./uid-2.sh[6]: xx:  not found.&lt;BR /&gt;&lt;BR /&gt;Could you help me out?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Jan 2003 06:12:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-filesystems-with-numeric-uid/m-p/2887733#M102271</guid>
      <dc:creator>Chern Jian Leaw</dc:creator>
      <dc:date>2003-01-23T06:12:45Z</dc:date>
    </item>
  </channel>
</rss>

