Finding files by Extention in a CLI

Paul Howarth paul at city-fan.org
Fri Feb 11 18:29:18 UTC 2005


Paul Howarth wrote:
> H. Streit wrote:
> 
>> Okay, so I've just copied over a bunch of files and I want to find all 
>> .com/.COM/.Com files...
>> I thought "find . -print|grep -i ".com" would work, tried a few 
>> variants, but I know I'm doing something wrong...any takers?
> 
> 
> $ 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.

You learn something every day on this list.

Paul.




More information about the fedora-list mailing list