Re: grep.... I know I am new to ubuntu but....
lina <[email protected]>
| Newsgroups | gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <CAG9cJm=HaNNawKx0QNvFqW94nheBm=j3ZZ=vEC6eKz0Coh+USA@mail.gmail.com> |
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?