This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: long command lines
- To: cygwin at sourceware dot cygnus dot com
- Subject: Re: long command lines
- From: dkarr at tcsi dot com (David M. Karr)
- Date: 25 Jan 2001 16:42:03 -0800
- References: <3A70B734.A18289E@nuance.com>
>>>>> "Mike" == Mike Schuster <schuster@nuance.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@tcsi.com ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple