From owner-freebsd-questions@FreeBSD.ORG Mon Mar 15 23:12:24 2004 Return-Path: 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 8FB6E16A4CE for ; Mon, 15 Mar 2004 23:12:24 -0800 (PST) Received: from craig.afraid.org (CPE0050bf78b8c6-CM000a739ac1da.cpe.net.cable.rogers.com [67.60.253.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A66C43D41 for ; Mon, 15 Mar 2004 23:12:24 -0800 (PST) (envelope-from craig@craig.afraid.org) Received: from craig.internal.lan ([10.0.0.2] helo=redline) by craig.afraid.org with smtp (Exim 4.30; FreeBSD) id 1B38kR-000EYz-Vs; Tue, 16 Mar 2004 02:12:23 -0500 Message-ID: <000701c40b26$3d5797f0$0200000a@redline> From: "Craig Reyenga" To: "Dave Carrera" References: <002501c40b24$8c600e10$0301a8c0@daveslaptop> Date: Tue, 16 Mar 2004 02:13:53 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 cc: questions@freebsd.org Subject: Re: Simple file count question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2004 07:12:24 -0000 find /path/to/dir -type f -name db\* -print | wc -l would count the number of files that begin with 'db' in the name, under the '/path/to/dir' directory. man find and man wc for more action. -Craig ----- Original Message ----- From: "Dave Carrera" To: Sent: Tuesday, March 16, 2004 2:01 AM Subject: Simple file count question Hi List, I know this is going to be simple but I cant find a suitable answer by trawling the web so I ask how do I count the number of certain files in a directory? So I am in my dir and want to count how many files begin with db and show me the number. I hope you can help me and thank you in advance for any help you may give Dave C --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.622 / Virus Database: 400 - Release Date: 13/03/2004 _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"