Find files that contain a text string


/ Published in: Other
Save to your folder(s)

The -l switch outputs only the names of files in which the text occurs (instead of each line containing the text), the -i switch ignores the case, and the -r descends into subdirectories.


Copy this code and paste it in your HTML
  1. grep -lir "text to find" *

URL: http://smart-pad.blogspot.com/2006/11/linux-find-files-containing-text.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.