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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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 _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"