bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ls command


From: Rich
Subject: Re: ls command
Date: Mon, 07 Jun 2004 17:05:24 -0300

On Mon, 2004-06-07 at 13:57, David T-G wrote:
> Rich --
> 

> % 
> % I have come accross what seems to be a bug with the ls command.  It only
> % happens in directories over a few thousand entries.
> [snip]
> 
> The odds of this truly being a bug in ls are pretty low.  It has nothing
> to do with ls, and it's not really even a bug.  The problem is that your
> shell command line can only be so large, and the listing of files you've
> provided exceeds the limit.
> 
Thanks.  Thats what I suspected.  Is it the shell that expands the * or
is it the command?  I guestimate would be the shell is expanding it. :)

> See
> 
>   http://www.gnu.org/software/fileutils/doc/faq/#Argument%20list%20too%20long
> 
> for further info.

Thanks. :)

> 
> I am, I must admit, a trifle curious that your tail and grep commands
> appear to succeed.  Every time this has ever come up in my experience
> no commands work once you hit the limit.
> 

I was able to get grep to fail, it took a few more hundred files.
Choked on the same thing.  The find command is working tho..

I ran a tail on 6000 files (3 to 4 lines) and it worked.
I should of ran it after the grep failed.  The files are gone now, but
there is always next run in a few days. :)

> If these really do work, please at least document
> 
>   your OS version
>   grep and tail version
>   ls version
> 

Linux 2.4.9-e.34enterprise #1 SMP Wed Dec 10 16:42:39 EST 2003 i686
ls (fileutils) 4.1
grep (GNU grep) 2.4.2
tail (textutils) 2.0.14
sh (AT&T Labs Research) 1993-12-28 n+

We actually live on ksh and not bash. I feel that is the root of all my
nightmares. :)

Just curious...
Would you know how to get rid of that annoying 80 col line limit in ksh.
I've been searching and searching, asking anyone technical enough to
know.  Just when we think we have it, nope.  I looked at a lot of the
stty options compared Linux to the SGI and Solaris machines we run. 

What happens:   prompt here> command xxxx  x xxx  (once you hit 80
characters, it shifts the line to the prompt like a type writer, no line
wrap.  When you go to edit,  you get $ >xxxx xxxx xxx xxx[ ]  
       when you move back, you get   $ >xx[ ] x xxx xxx xxx*
It gets worse as the prompt grows, I often end up using PS="$" to get
some typing room or for editing, because the PS variable is so limited
in ksh.  Sux...  oh well..

> and make available a long listing of the files for perusal and we can see
> if it's really a problem.
Sorry I cannot release the filenames, but it should be easy to
reproduce, with a for next loop.  Create about 7000 or so files with
filename length of 17 characters.  x(13).x(3)

> 
> 
> HTH & TIA & HAND
Thanks.  It did.   Have a good one. :)



Thanks again for replying so quickly.
Regards,
Rich






reply via email to

[Prev in Thread] Current Thread [Next in Thread]