Find files that does not contain a string

后端 未结 5 1021
不思量自难忘°
不思量自难忘° 2020-12-31 18:18

To find all the files that contain \"foo\" in current folder, I use:

grep -r \"foo\" .

To find all the files that contain \"bar\" in curren

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 18:35

    Recursively searches directories for all files that do no contains XYZ

    find . -type f | xargs grep -L "XYZ"
    

提交回复
热议问题