<?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: counting sub-directories in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186613#M163945</link>
    <description>find should - in general - be the fastest, but they won't always give the same result.&lt;BR /&gt;&lt;BR /&gt;sh-2.05b$ time perl -lMFile::Find -e'END{print$n}find(sub{-d&amp;amp;&amp;amp;$n++},".")'&lt;BR /&gt;19&lt;BR /&gt;&lt;BR /&gt;real    0m0.109s&lt;BR /&gt;user    0m0.110s&lt;BR /&gt;sys     0m0.000s&lt;BR /&gt;sh-2.05b$ time find . -type d | wc -l&lt;BR /&gt;     19&lt;BR /&gt;&lt;BR /&gt;real    0m0.018s&lt;BR /&gt;user    0m0.010s&lt;BR /&gt;sys     0m0.010s&lt;BR /&gt;sh-2.05b$ time ls -R | grep "./" | wc -l&lt;BR /&gt;     18&lt;BR /&gt;&lt;BR /&gt;real    0m0.042s&lt;BR /&gt;user    0m0.020s&lt;BR /&gt;sys     0m0.020s&lt;BR /&gt;sh-2.05b$&lt;BR /&gt;timex &lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
    <pubDate>Mon, 09 Feb 2004 12:38:14 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2004-02-09T12:38:14Z</dc:date>
    <item>
      <title>counting sub-directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186609#M163941</link>
      <description>On my 11i system, the automated process gets the error "Too many links" when trying to make a new directory (new log file directory every day, and several at the same time -- stupid application!)&lt;BR /&gt;&lt;BR /&gt;Anyway, searching here I found that PHKL_28185 has removed vx_maxlink as a configurable parameter and set it to 65534. That should be enough, but I need to see how many directory links there are.  I tried this but I am not sure I am getting the right number.&lt;BR /&gt;&lt;BR /&gt;ls -R | grep "./" | wc -l&lt;BR /&gt;&lt;BR /&gt;I am counting the number of times ./ appears which seems to be the start of a subdirectory.&lt;BR /&gt;&lt;BR /&gt;Is there a better way?&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Feb 2004 12:23:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186609#M163941</guid>
      <dc:creator>Gord Moore</dc:creator>
      <dc:date>2004-02-09T12:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: counting sub-directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186610#M163942</link>
      <description>Gord,&lt;BR /&gt;&lt;BR /&gt;try&lt;BR /&gt;find . -type d | wc -l&lt;BR /&gt;&lt;BR /&gt;(-type d: only directories).&lt;BR /&gt;If the count is approx the same as the ls -R, than it's OK?!&lt;BR /&gt;&lt;BR /&gt;JP</description>
      <pubDate>Mon, 09 Feb 2004 12:27:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186610#M163942</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2004-02-09T12:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: counting sub-directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186611#M163943</link>
      <description>I kind of like our way.&lt;BR /&gt;&lt;BR /&gt;Its not very processor intensive.&lt;BR /&gt;&lt;BR /&gt;numsub=$(ls -R grep "./" |wc -l)&lt;BR /&gt;export numsub&lt;BR /&gt;&lt;BR /&gt;Now I know the number of subbies.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 09 Feb 2004 12:27:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186611#M163943</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-02-09T12:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: counting sub-directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186612#M163944</link>
      <description>Slight difference in the counts, but either way tells me there are lots of sub-dirs out there.&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt; find . -type d | wc -l&lt;BR /&gt;31496&lt;BR /&gt;&amp;gt; ls -R | grep "./" | wc -l&lt;BR /&gt;31756&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Mon, 09 Feb 2004 12:37:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186612#M163944</guid>
      <dc:creator>Gord Moore</dc:creator>
      <dc:date>2004-02-09T12:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: counting sub-directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186613#M163945</link>
      <description>find should - in general - be the fastest, but they won't always give the same result.&lt;BR /&gt;&lt;BR /&gt;sh-2.05b$ time perl -lMFile::Find -e'END{print$n}find(sub{-d&amp;amp;&amp;amp;$n++},".")'&lt;BR /&gt;19&lt;BR /&gt;&lt;BR /&gt;real    0m0.109s&lt;BR /&gt;user    0m0.110s&lt;BR /&gt;sys     0m0.000s&lt;BR /&gt;sh-2.05b$ time find . -type d | wc -l&lt;BR /&gt;     19&lt;BR /&gt;&lt;BR /&gt;real    0m0.018s&lt;BR /&gt;user    0m0.010s&lt;BR /&gt;sys     0m0.010s&lt;BR /&gt;sh-2.05b$ time ls -R | grep "./" | wc -l&lt;BR /&gt;     18&lt;BR /&gt;&lt;BR /&gt;real    0m0.042s&lt;BR /&gt;user    0m0.020s&lt;BR /&gt;sys     0m0.020s&lt;BR /&gt;sh-2.05b$&lt;BR /&gt;timex &lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Mon, 09 Feb 2004 12:38:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/counting-sub-directories/m-p/3186613#M163945</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-02-09T12:38:14Z</dc:date>
    </item>
  </channel>
</rss>

