Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Re: 11895 | 16 comments | Create New Account
Click here to return to the 'Re: 11895' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Re: 11895
Authored by: spicyj on Aug 22, '07 03:29:51PM
or find ~/Pictures -print -type f | grep -i ".jpg" | wc -l.

[ Reply to This | # ]
Re: 11895
Authored by: sjk on Aug 26, '07 01:33:40PM
The grep command in the previous versions will match jpg patterns anywhere within the filename. Try this:

find -E ~/Pictures -type f -iregex '.*/*\.jp?.g$' | wc -l

[ Reply to This | # ]
Re: 11895
Authored by: zs on Sep 04, '07 03:15:19PM
A bit simpler:
find ~/Photos/Dir -iname *.jpg | wc -l

---
zs

[ Reply to This | # ]