Finding files by Extention in a CLI

H. Streit hstreit at swri.edu
Fri Feb 11 18:22:49 UTC 2005


Thanks guys!

Matthew Miller wrote:
> On Fri, Feb 11, 2005 at 12:13:23PM -0600, 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?
> 
> 
> That will work, except it matches anything which contains the string "com"
> preceded by any character. It's also inefficient since the find command
> itself can do the filtering. Try this:
> 
>   find . -iname '*.com'
> 
> 




More information about the fedora-list mailing list