From owner-freebsd-questions Wed Sep 11 12:54:10 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 140A337B400 for ; Wed, 11 Sep 2002 12:54:08 -0700 (PDT) Received: from wopr.caltech.edu (wopr.caltech.edu [131.215.103.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9154343E42 for ; Wed, 11 Sep 2002 12:54:07 -0700 (PDT) (envelope-from mph@wopr.caltech.edu) Received: from wopr.caltech.edu (localhost.caltech.edu [127.0.0.1]) by wopr.caltech.edu (8.12.3/8.12.3) with ESMTP id g8BJs63v078668; Wed, 11 Sep 2002 12:54:07 -0700 (PDT) (envelope-from mph@wopr.caltech.edu) Received: (from mph@localhost) by wopr.caltech.edu (8.12.3/8.12.3/Submit) id g8BJs6GR078667; Wed, 11 Sep 2002 12:54:06 -0700 (PDT) Date: Wed, 11 Sep 2002 12:54:06 -0700 From: Matthew Hunt To: How Can ThisBe Cc: freebsd-questions@FreeBSD.ORG Subject: Re: count files in a directory with ls? Message-ID: <20020911125406.A78627@wopr.caltech.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from howcanthisbe300@hotmail.com on Wed, Sep 11, 2002 at 07:53:09PM +0000 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 On Wed, Sep 11, 2002 at 07:53:09PM +0000, How Can ThisBe wrote: > 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. ls | wc -l -- Matthew Hunt * Eight lanes of shimmering cement from http://www.pobox.com/~mph/ * here to Pasadena! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message