Finding files by Extention in a CLI

Matthew Miller mattdm at mattdm.org
Fri Feb 11 18:35:09 UTC 2005


On Fri, Feb 11, 2005 at 06:29:18PM +0000, Paul Howarth wrote:
> >$ find . -name '*.[Cc][Oo][Mm]' -print
> My excuse for not using the vastly superior "find . -iname '*.com'" 
> is... I didn't know about it! I use HP-UX a lot at work and the HP-UX 
> version of "find" doesn't have the -iname option.

That's one of the better excuses. :)

With the GNU find package, you also don't need to specify "-print", as it's
the default action if nothing else is given. When writing scripts, though, I
try to remember to use it for compatibility.

-- 
Matthew Miller            mattdm at mattdm.org        <http://www.mattdm.org/>
-->  Fedora Users & Developers Conference, hosted by Boston University  <--
February 18th, 2005                       <http://fedoraproject.org/fudcon/>  




More information about the fedora-list mailing list