From owner-freebsd-questions@FreeBSD.ORG Sun Jul 26 18:24:35 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15D15106566C for ; Sun, 26 Jul 2009 18:24:35 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: from mx1.identry.com (on.identry.com [66.111.0.194]) by mx1.freebsd.org (Postfix) with ESMTP id A33648FC16 for ; Sun, 26 Jul 2009 18:24:34 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: (qmail 98647 invoked by uid 89); 26 Jul 2009 18:24:51 -0000 Received: from unknown (HELO ?192.168.1.110?) (jalmberg@75.127.142.66) by mx1.identry.com with ESMTPA; 26 Jul 2009 18:24:51 -0000 In-Reply-To: <200907260045.12045.mel.flynn+fbsd.questions@mailing.thruhere.net> References: <20090725222918.AC51DB7E0@kev.msw.wpafb.af.mil> <4A6C071A.3020800@infracaninophile.co.uk> <200907260045.12045.mel.flynn+fbsd.questions@mailing.thruhere.net> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <8A69BBD9-5F3C-44B8-96C0-586C1B5A386F@identry.com> Content-Transfer-Encoding: 7bit From: John Almberg Date: Sun, 26 Jul 2009 14:24:31 -0400 To: Mel Flynn X-Mailer: Apple Mail (2.753.1) Cc: freebsd-questions@freebsd.org Subject: Re: limit to number of files seen by ls? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jul 2009 18:24:35 -0000 On Jul 26, 2009, at 4:45 AM, Mel Flynn wrote: > On Saturday 25 July 2009 23:34:50 Matthew Seaman wrote: > >> It's fairly rare to run into this as a practical >> limitation during most day to day use, and there are various >> tricks like >> using xargs(1) to extend the usable range. Even so, for really big >> applications that need to process long lists of data, you'ld have >> to code >> the whole thing to input the list via a file or pipe. > > ls itself is not glob(3) aware, but there are programs that are, > like scp. So > the fastest solution in those cases is to single quote the argument > and let > the program expand the glob. for loops are also a common work around: > ls */* == for f in */*; do ls $f; done > > Point of it all being, that the cause of the OP's observed behavior > is only > indirectly related to the directory size. He will have the same > problem if he > divides the 4000 files over 4 directories and calls ls */* H'mmm... I haven't come back on this question, because I want my next question to be an intelligent one, but I'm having a hard time understanding what is going on. I'm reading up on this, and as soon as I know enough to either understand the issue, or ask an intelligent question, I will do so... Thanks for all the comments... -- John