delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/19/11:49:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-envelope-info: <rschulz AT sonic DOT net>
Message-Id: <5.2.1.1.2.20030519084549.00ff17f8@pop.sonic.net>
X-Sender: rschulz AT pop DOT sonic DOT net
Date: Mon, 19 May 2003 08:49:09 -0700
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rschulz AT sonic DOT net>
Subject: Re: many files
In-Reply-To: <H00011000d95a0ed.1053348695.oma.apl.ct.cz@MHS>
Mime-Version: 1.0

Roman,

You've come up against a limit that Unix and Unix-like systems, 
including Cygwin, impose on the total amount of command argument data 
that can be passed.

You should learn about the xargs command as one tool for dealing with 
this restriction. It is found in all Unix-like systems.

In this particular case, you could use something like this to count the 
number of files whose names end in log (did you mean ".log"?):

ls |grep 'log$' |wc -l


Randall Schulz


At 05:51 2003-05-19, sladek DOT roman AT ct DOT cz wrote:
>I can't use ls *log command in directory where is stored many files.
>I have this script for simulate my problem:
>#
>POCET=0
>while [ $POCET -ne 840 ]
>do
>POCET=`expr $POCET + 1`
>echo "file nr.$POCET"
>touch Split1.$POCET.INCA_SENTRALOMRADE__.cif.log
>ls *log|wc -l
>done
>
>results is here:
>file nr.1
>1
>.....etc. ...
>file nr.820
>820
>file nr.822
>./a.sh: ls: error 22
>0
>also from
>bash$ ls *log
>bash: /usr/bin/ls: Invalid argument
>but:
>bash$ ls
>work fine, where is problem?
>my cygwin version is 1.3.22(0.78/3/2)


--
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/

- Raw text -


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