Simple file count question

Craig Reyenga craig at craig.afraid.org
Mon Mar 15 23:12:24 PST 2004


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" <dave at ephgroup.com>
To: <freebsd-questions at freebsd.org>
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 at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"




More information about the freebsd-questions mailing list