Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Sep 2002 12:54:06 -0700
From:      Matthew Hunt <mph@astro.caltech.edu>
To:        How Can ThisBe <howcanthisbe300@hotmail.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: count files in a directory with ls?
Message-ID:  <20020911125406.A78627@wopr.caltech.edu>
In-Reply-To: <F27UtI9dm5UxP9Fekza0000013f@hotmail.com>; from howcanthisbe300@hotmail.com on Wed, Sep 11, 2002 at 07:53:09PM %2B0000
References:  <F27UtI9dm5UxP9Fekza0000013f@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <mph@astro.caltech.edu> * 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020911125406.A78627>