<?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: ls listing problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935663#M288083</link>
    <description>ls does not have any limits. It simply takes the command line as supplied from the shell. But your shell is expanding filenames prior to passing them to ls. To see what ls (or any other program will see, put echo in front:&lt;BR /&gt; &lt;BR /&gt;echo ls *&lt;BR /&gt; &lt;BR /&gt;You will see that * is a special character for the shell and is automatically replaced with a list of all the filenames in the current directory. If this list is more than several megs long, the error message is produced (not from ls) by the shell. The maximum line length in bytes is:&lt;BR /&gt; &lt;BR /&gt;getconf ARG_MAX&lt;BR /&gt; &lt;BR /&gt;Now if you have tens of thousands of files in a single directory, you will ALWAYS run into this limit. Read the man page for xargs and look at ways to reduce the total line length when using shell globbing characters. Note that large_ncargs_enabled will increase the line length but no matter how long you make it, there can be a list longer than that.</description>
    <pubDate>Wed, 31 Jan 2007 10:23:50 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2007-01-31T10:23:50Z</dc:date>
    <item>
      <title>ls listing problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935659#M288079</link>
      <description>How do you increase buffer size/other on&lt;BR /&gt;hp-ux 10.20 for "ls" when listing lots of&lt;BR /&gt;files.</description>
      <pubDate>Wed, 31 Jan 2007 08:59:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935659#M288079</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2007-01-31T08:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: ls listing problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935660#M288080</link>
      <description>Hi Jerry:&lt;BR /&gt;&lt;BR /&gt;Enable (set to one (1)) the kernel parameter 'large_ncargs_enabled' and regenerate your kernel.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 31 Jan 2007 09:05:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935660#M288080</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-01-31T09:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: ls listing problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935661#M288081</link>
      <description>Jerry,&lt;BR /&gt;do you mean you get "Arguments list too long" ?&lt;BR /&gt;&lt;BR /&gt;See Dave's comment in:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=354506" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=354506&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;"large_ncargs_enabled 1&lt;BR /&gt;And recompile the kernel by hand."&lt;BR /&gt;&lt;BR /&gt;If you listing lots and lots of files to screen, and you do not have the "arguments list too long", re-direct the list into a file, which may prove quicker.&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jan 2007 09:09:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935661#M288081</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-01-31T09:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: ls listing problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935662#M288082</link>
      <description>... and you are really asking the fundamentally wrong question. The question is "Why are there so many files in this directory?" because no matter how large ncargs is, there will still be a problem at some point.</description>
      <pubDate>Wed, 31 Jan 2007 10:13:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935662#M288082</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-01-31T10:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: ls listing problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935663#M288083</link>
      <description>ls does not have any limits. It simply takes the command line as supplied from the shell. But your shell is expanding filenames prior to passing them to ls. To see what ls (or any other program will see, put echo in front:&lt;BR /&gt; &lt;BR /&gt;echo ls *&lt;BR /&gt; &lt;BR /&gt;You will see that * is a special character for the shell and is automatically replaced with a list of all the filenames in the current directory. If this list is more than several megs long, the error message is produced (not from ls) by the shell. The maximum line length in bytes is:&lt;BR /&gt; &lt;BR /&gt;getconf ARG_MAX&lt;BR /&gt; &lt;BR /&gt;Now if you have tens of thousands of files in a single directory, you will ALWAYS run into this limit. Read the man page for xargs and look at ways to reduce the total line length when using shell globbing characters. Note that large_ncargs_enabled will increase the line length but no matter how long you make it, there can be a list longer than that.</description>
      <pubDate>Wed, 31 Jan 2007 10:23:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935663#M288083</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2007-01-31T10:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: ls listing problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935664#M288084</link>
      <description>Unfortunatly. Changing the legacy code to&lt;BR /&gt;not use "ls" and to use something like "find"&lt;BR /&gt;is not an option now. It's coded everywhere.&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jan 2007 13:30:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935664#M288084</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2007-01-31T13:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: ls listing problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935665#M288085</link>
      <description>Your problems go way beyond ls because ls isn't the fundmental problem. Anytime you supply '*' as an argument to any command in this directory, the shell is going to explode. If memory serves, you can't simply build a kernel defining large_ncarg_args; there was a patch for 10.X that you had to install first -- so good luck finding it in the legacy patch database. Be glad you didn't live in the days of real UNIX when ARGMAX was 5120 bytes and couldn't be changed -- and you could only have 20 file descriptors per process.</description>
      <pubDate>Wed, 31 Jan 2007 19:59:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935665#M288085</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-01-31T19:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: ls listing problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935666#M288086</link>
      <description>&amp;gt;Changing the legacy code to not use "ls"&lt;BR /&gt;&lt;BR /&gt;Instead of using ls pattern, you might be able to just replace this by ls | grep RE-pattern.&lt;BR /&gt;&lt;BR /&gt;That might be easier than find.</description>
      <pubDate>Wed, 31 Jan 2007 23:37:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ls-listing-problem/m-p/3935666#M288086</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-01-31T23:37:04Z</dc:date>
    </item>
  </channel>
</rss>

