Posted By

claudiodev on 10/23/12


grep find xargs

Versions (?)

Find and List files containing/not containg a certain string

 / Published in: Bash

Find and List all the files with extension .file containing/not containing the given string "STRING"

The snippet is set to "containing", to switch it to "not containg" just replace "grep -l" with "grep -L"

containing : grep -l not containing: grep -L

  1. find . -type f -name "*.file" | xargs grep -l "STRING"

Report this snippet  

You need to login to post a comment.