Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: Lines: 34 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>>> "Mike" == Mike Schuster 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