From owner-freebsd-questions Wed Sep 11 12:55:45 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD8D937B401 for ; Wed, 11 Sep 2002 12:55:41 -0700 (PDT) Received: from casper.sri.com (casper.SRI.COM [128.18.243.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 4E07743E3B for ; Wed, 11 Sep 2002 12:55:41 -0700 (PDT) (envelope-from hogsett@csl.sri.com) Received: (qmail 13282 invoked from network); 11 Sep 2002 19:59:11 -0000 Received: from localhost (HELO casper.SRI.COM) (127.0.0.1) by casper.sri.com with SMTP; 11 Sep 2002 19:59:11 -0000 Received: from quarter.csl.sri.com ([130.107.1.30]) by casper.SRI.COM (NAVGW 2.5.1.18) with SMTP id M2002091112591120256 ; Wed, 11 Sep 2002 12:59:11 -0700 Received: from axp.csl.sri.com (axp.csl.sri.com [130.107.2.30]) by quarter.csl.sri.com (8.12.4/8.12.4) with ESMTP id g8BJtenr003509; Wed, 11 Sep 2002 12:55:40 -0700 Received: from axp.csl.sri.com (localhost [127.0.0.1]) by axp.csl.sri.com (8.12.3/8.12.3) with ESMTP id g8BJtdP8065907; Wed, 11 Sep 2002 12:55:39 -0700 (PDT) (envelope-from hogsett@axp.csl.sri.com) Message-Id: <200209111955.g8BJtdP8065907@axp.csl.sri.com> To: "How Can ThisBe" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: count files in a directory with ls? In-Reply-To: Message from "How Can ThisBe" of "Wed, 11 Sep 2002 19:53:09 -0000." Mime-Version: 1.0 (generated by tm-edit 8.8 (Time Passed Me By)) Content-Type: text/plain; charset=US-ASCII Date: Wed, 11 Sep 2002 12:55:39 -0700 From: Mike Hogsett Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ls | wc -l > How can I return the number of files in a directory? I was hoping for some > kind of ls switch but did not find one. I did get excited about du -c but > this returns a total of bytes, not files. > > Any ideas? I thought this would be have been something simple to find, I > guess I may have just been looking in the wrong direction. > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message