This is the mail archive of the
mailing list for the Cygwin project.
Re: many files
- From: Randall R Schulz <rschulz at sonic dot net>
- To: cygwin at cygwin dot com
- Date: Mon, 19 May 2003 08:49:09 -0700
- Subject: Re: many files
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
At 05:51 2003-05-19, firstname.lastname@example.org wrote:
I can't use ls *log command in directory where is stored many files.
I have this script for simulate my problem:
while [ $POCET -ne 840 ]
POCET=`expr $POCET + 1`
echo "file nr.$POCET"
ls *log|wc -l
results is here:
./a.sh: ls: error 22
bash$ ls *log
bash: /usr/bin/ls: Invalid argument
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