From owner-freebsd-questions Tue Dec 3 1:11:39 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 193BE37B404 for ; Tue, 3 Dec 2002 01:11:38 -0800 (PST) Received: from bellavista.cz (mail.bellavista.cz [62.168.44.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DBF943EA9 for ; Tue, 3 Dec 2002 01:11:32 -0800 (PST) (envelope-from neuhauser@bellavista.cz) Received: from lilith.bellavista.cz ([10.1.0.1]) by bellavista.cz (8.9.3/8.9.8) with ESMTP id KAA02783 for ; Tue, 3 Dec 2002 10:11:15 +0100 Received: from freepuppy.bellavista.cz (freepuppy.bellavista.cz [10.0.0.10]) by lilith.bellavista.cz (Postfix) with ESMTP id 590B9246 for ; Tue, 3 Dec 2002 11:09:38 +0100 (CET) Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id B09FC2FDAE8; Tue, 3 Dec 2002 10:10:44 +0100 (CET) Date: Tue, 3 Dec 2002 10:10:44 +0100 From: Roman Neuhauser To: FreeBSD LIST Subject: Re: File Counts Message-ID: <20021203091044.GF56031@freepuppy.bellavista.cz> Mail-Followup-To: FreeBSD LIST References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i 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 # Hostmaster@Video2Video.Com / 2002-12-02 21:26:24 -0500: > On Mon, 2 Dec 2002, Doug Hardie wrote: > > Thanks to all who responded. The approach below does just what I > > needed. > > Here's another way I don't see listed: > > $ find . -type f | wc -l > > This means "find, starting right here, all files here and in > subdirectories - then pipe the output through word count just the > lines." > > You'd think FreeBSD would have a command similar to ls, df, du or a > flag to the find command such as "-countitems" or something. count the keystrokes: find . -type f|wc -l find . -type f -countitems plus, -countitems switch would only work for find(1), obviously, while a pipe to wc(1) works with any output. of course, if you want to see the number of files/directories/symlinks in current directory, setup a function to compute them, and let your shell display the results in your prompt. -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message