On Tue, Oct 23, 2012 at 8:27 PM, Thomas Petazzoni <thomas.petazz...@free-electrons.com> wrote: >> > find . -exec fgrep -H "$1" {} \; >> > >> > but with lots and lots of other qualifiers. You can see a usable >> > version at >> > >> > https://www.ridgerun.com/developer/wiki/index.php/Tip_of_the_day#finds_-_find_a_string_in_common_text_files >> >> This looks useful. >> >> I do something similar with the kernel. I have >> a small one-line wrapper called armcgrep, which greps only the files >> in the arch/arm section of the kernel source tree, and only those >> with filenames matching the pattern "*.[chS]". Once things >> are in the page cache, it works pretty fast. >> >> 'finds' looks similar, but it also omits some areas, and includes >> things like Kconfig and others. I need to mentally digest all >> the 'find' magic in it... > > Note also that you can use 'git grep', that will only grep the source > files that are under version control, skipping all object files and > other generated files you may have in your tree, if you're not doing > out of tree builds. I use 'git grep' routinely.
Yeah. For Tim's use case: git grep <pattern> -- "arch/arm/*.[chS]" Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ Celinux-dev mailing list Celinux-dev@lists.celinuxforum.org https://lists.celinuxforum.org/mailman/listinfo/celinux-dev