From: "Hannu E K Nevalainen" <garbage_collector@telia.com>
To: <cygwin@cygwin.com>
Subject: RE: bash /usr/bin/ls invalid argument
Date: Wed, 29 Oct 2003 15:23:00 -0000 [thread overview]
Message-ID: <NGBBLLIAMFLGJEOAJCCEIENGDFAA.garbage_collector@telia.com> (raw)
In-Reply-To: <3F9F7FA3.6060809@free.fr>
> From: Nicolas BUONOMO
> Sent: Wednesday, October 29, 2003 9:52 AM
> Hello,
>
> Hannu E K Nevalainen a écrit :
>
> >>From: Jared Ingersoll
> >>Sent: Monday, October 27, 2003 8:55 PM
> >
> > ....
> >
> > There is a 32KB length limit on the command line. This is
> imposed on us by
> > the underlying "OS" - i.e. not likely to change.
> >
> >
> > To check how long your command line would be, try something like this:
> >
> > $ find -type f -name 'send.log.*' |
> > (
> > read f;
> > cc=-1;
> > echo "";
> > while [ ! -z "$f" ];do
> > cc=$(( 1 + $cc + $( echo "$f" | wc -c) ));
> > echo -e "\e[F$cc\e[K";read f;
> > done;
> > echo -e "\e[F$cc chars"
> > )
> >
> > Remember to add the length of e.g. "ls -l " (note space).
> >
> > If this gives a number larger than...
> >
> > $ echo $(( ( 1 << 15 ) -1 ))
> > 32767
> >
> > ... then you're "outta luck".
> >
>
> I try your command on a Microsoft XP pro and I win
>
> nicolas@cl12369n ~ s=1
> $ find -type f -name '*' | ( read f; cc=-1; echo ""; while
> [ ! -z "$f" ]; do cc=$(( 1 + $cc + $( echo "$f" | wc -c) ));
> echo -e "\e[F$cc\e[K";read f; done; echo -e "\e[F$cc chars"; )
> 1789980 chars
>
> Where is the problem?
>
=-) there is no problem with _my_ command. It was to show _when_ there is a
problem - and what the problem consists of.
Try "ls -l *" in the same directory as you did your test in. That will give
you an error message, due to the limit mentioned earlier in this thread.
/Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E
-- printf("LocalTime: UTC+%02d\n",(DST)? 1:2); --
--END OF MESSAGE--
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
next prev parent reply other threads:[~2003-10-29 14:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-28 0:12 Jared Ingersoll
2003-10-28 1:13 ` Andrew DeFaria
2003-10-28 12:57 ` Hannu E K Nevalainen
2003-10-29 10:17 ` Nicolas BUONOMO
2003-10-29 15:23 ` Hannu E K Nevalainen [this message]
2003-10-28 14:08 Jared Ingersoll
2003-10-28 16:05 ` Christopher Faylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=NGBBLLIAMFLGJEOAJCCEIENGDFAA.garbage_collector@telia.com \
--to=garbage_collector@telia.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).