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

Reply via email to