delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/25/20:25:15

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: long command lines
References: <3A70B734 DOT A18289E AT nuance DOT com>
From: dkarr AT tcsi DOT com (David M. Karr)
Date: 25 Jan 2001 16:42:03 -0800
In-Reply-To: Mike Schuster's message of "Thu, 25 Jan 2001 15:31:00 -0800"
Message-ID: <uyg0i7p2jo.fsf@tcsi.com>
Lines: 34
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.6
MIME-Version: 1.0

>>>>> "Mike" == Mike Schuster <schuster AT nuance DOT com> writes:
  Mike> Problem: I couldn't figure out how to get very long command line
  Mike> arguments to work (~32k) (for example 'ls */*/*/*', if you have a lot of
  Mike> files on the disk).

  Mike> Question: Does anybody know if this
  Mike>   a) a Windows problem,
  Mike>   b) a cygwin problem,
  Mike>   c) something that can easily be fixed by setting some parameter
  Mike> (Which?).

Before, when I only worked on Unix (with Ksh, NOT Csh), I used to use
command lines like this all the time:

    somecmd $(find . -type f)

When I started needing to do similar things on Cygwin, I discovered
the line length problem, and concluded there was no "fix" for it.

The only way (others?) to deal with this is to break up commands like
the latter into something like this:

    find . -type f | xargs -n100 somecmd

Depending on what "somecmd" is, and the average length of your file
names, you might have to use less than 100 per command, or going the
other direction, you could get away with using more per command.

Fortunately, using this strategy is still portable back up to Unix.

-- 
===================================================================
David M. Karr     ; w:(425)487-8312     ; TCSI & Best Consulting
dkarr AT tcsi DOT com    ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019