-lir "text you want to find" *
You could put it as background if it is longer time search

grep -lir "text you want to find" * > searchresult.txt &

example.

I want to search ‘archives/simple’ in my ‘data’ directory

cd ./data/
grep -lir "archives/simple" * > searchresult.txt &

After done, then you can type
cat searchresult.txt
then you will know which files contain the text.
If you want to know which line that contain the text
You could type
cat data/bbscache/index.html | grep "archives/simple"
*** data/bbscache/index.html is my example result.

Some people search for:

  • grep -lir
  • grep lir
  • centos containing text
  • file search indexing linux php OR java -windows -search engine
  • find file containing text
  • find grep lir
  • program to find file containing text in ubuntu
  • search file * txt in linux
Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Dreamhost Coupon Code

Optimized by SEO Ultimate