Re: grep.... I know I am new to ubuntu but....

DAVE HITCHMAN <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <37404572.635412.1328766723888.JavaMail.root@md07.topaz.synacor.com>
Tried that, first one I tried, *.c is not a file or directory...
despite the fact there are around 200 *,c files in directories below the one I am in.

Maybe its just an ubuntu thing

----- Original Message -----
From: lina <[email protected]>
To: DAVE HITCHMAN <[email protected]>
Cc: [email protected]
Sent: Thu, 09 Feb 2012 05:14:27 -0000 (UTC)
Subject: Re: grep.... I know I am new to ubuntu but....

grep -l "yourstring" *.c

On Wed, Feb 8, 2012 at 4:45 PM, DAVE HITCHMAN <[email protected]> wrote:
>
> I have a directory structure, inside that are a number of .c source files. I want to find which of those files contain certain strings.
> In a DOS window using grep I would type
> grep "mystring" -i *.c
> this would result in a list of .c files containing the string.
>
> If I try similar strings with ubuntu even with ack-grep which is supposed to be an improvement I keep getting told that *.c no such file or directory.
>
> Even trying the various bizarre combinations of finds and execs that I have seen on the web I can't seem to do this very simple task. If Microsoft can have managed to provide find in files and various other similar things for over 20 years isn't it time I could do the same on a linux system without the need to spend 10 hours searching endless uninformative websites all lying about what works?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.