Find text strings in files on linux server

On March 4, 2010, in Terminal, by Steve

I have been looking for a command to find text strings within files on my linux box. After much searching I am now using the following command which does the job perfectly.

find /path/to/folder/ -type f -print0 | xargs -0 grep -l “TEXT YOU WANT TO FIND”

let me know if this is useful or can be improved.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz
  • Ping.fm
  • RSS
 

1 Response » to “Find text strings in files on linux server”

  1. Dave says:

    WOW, cheers Steve, I had been looking for something like this but not found anything that did exactly what I required.

    This does the trick.

Leave a Reply

Premium WordPress Themes
Can't find what you are looking for? Need help on a topic or find something thats not right let me know
Free WordPress Theme