Date: Sat, 3 Nov 2007 14:31:28 +0100 From: Matthias Apitz <m.apitz@oclcpica.org> To: White Hat <pigskin_referee@yahoo.com> Cc: FreeBSD Users Questions <freebsd-questions@freebsd.org> Subject: Re: Determining the number of files in a directory Message-ID: <20071103133128.GA7665@rebelion.Sisis.de> In-Reply-To: <538619.51984.qm@web34408.mail.mud.yahoo.com> References: <538619.51984.qm@web34408.mail.mud.yahoo.com>
index | next in thread | previous in thread | raw e-mail
El día Saturday, November 03, 2007 a las 05:27:06AM -0700, White Hat escribió:
> This is probably a dumb question; however, I never let a little thing like that bother me in the past.
>
> Using FreeBSD-6.2 and Bash, how do I determine the number of files in a given directory? I have tried all sorts of combinations using different flags with the 'ls' command; however, none of them displays the number of files in the directory.
>
> Other than, by writing a script to accomplish this feat, how could I achieve my goal?
$ ls | wc -l
293
matthias
--
Matthias Apitz
Manager Technical Support - OCLC PICA GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <m.apitz@oclcpica.org> - w http://www.oclcpica.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071103133128.GA7665>
