Simple file count question
Joshua Lokken
joshua at twobirds.us
Tue Mar 16 00:59:37 PST 2004
* Dave Carrera <dave at ephgroup.com> [2004-03-15 23:02]:
> 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
>
I don't know if this is the most elegant way, but
ls | grep ^db | wc -l
will do it.
--
Joshua
I thought my people would grow tired of killing. But you were right,
they see it is easier than trading. And it has its pleasures. I feel
it myself. Like the hunt, but with richer rewards.
-- Apella, "A Private Little War", stardate 4211.8
More information about the freebsd-questions
mailing list