western willow ventures inc.

eye on the net
  • Home
  • Contact
  • Web
  • Graphics
  • ARDi
  • Samples
  • Terms of Service
  • Fun
  • Privacy

Search

Home | Blogs | Franco's blog

Recursive search for files with specific content using GREP

Fri, 2011-02-18 13:03 |  Franco

So you know that somewhere in your source folder (/source) that there is a script that uses the foo() function but you cant remember which one and there are thousands of files, what do you do?

You grep them!

grep -R -i -n 'foo()' *

Lets break it down, first we are grepping files, the -R indicates to search recursively, -i indicates we want to ignore case, and -n indicates we want to know which line of the file grep finds our search string on. then the search string in single quotes and lastly, a finame wildcard, in this case, search through every file.

Franco's blog |  Login to post comments |  849 reads |  Tags: command line, grep, linux, ubuntu

Popular content

Today's:

  • Recursive search for files with specific content using GREP
  • Alexandra Falls - birds eye view from ARDi
  • Getting back into digital art - Bob Ross in "The Gimp"

All time:

  • Contact
  • Web
  • ARDi - Aerial Research Drone One

Last viewed:

  • ARDi - Aerial Research Drone One
  • Contact
  • Sys admin tools on linux

Navigation

  • Login
  • Album photos
  • Contact form
  • Feed aggregator
© 2010 Western Willow Ventures Inc.

Designed by Heidi Selzler.