Skip to main content
deleted 18 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 239

The accepted answer didn't find all of them for me. Here is an example using grep's -I to ignore binaries, and ignoring all hidden files...

find . -type f -not -path '*/\.*' -exec grep -Il '.' {} \; | xargs -L 1 echo 

Here it is in use in a practical application: dos2unix

https://unix.stackexchange.com/a/365679/112190

Hope that helps.

The accepted answer didn't find all of them for me. Here is an example using grep's -I to ignore binaries, and ignoring all hidden files...

find . -type f -not -path '*/\.*' -exec grep -Il '.' {} \; | xargs -L 1 echo 

Here it is in use in a practical application: dos2unix

https://unix.stackexchange.com/a/365679/112190

Hope that helps.

The accepted answer didn't find all of them for me. Here is an example using grep's -I to ignore binaries, and ignoring all hidden files...

find . -type f -not -path '*/\.*' -exec grep -Il '.' {} \; | xargs -L 1 echo 

Here it is in use in a practical application: dos2unix

https://unix.stackexchange.com/a/365679/112190

Source Link
phyatt
  • 617
  • 8
  • 11

The accepted answer didn't find all of them for me. Here is an example using grep's -I to ignore binaries, and ignoring all hidden files...

find . -type f -not -path '*/\.*' -exec grep -Il '.' {} \; | xargs -L 1 echo 

Here it is in use in a practical application: dos2unix

https://unix.stackexchange.com/a/365679/112190

Hope that helps.