This question already has an answer here:
I tried using this:
$ find . -type f -exec file {} \;
./alma: ASCII text
./jaj.C: C source, ASCII text
./repa: ASCII text, with escape sequences
./mas.cpp: C++ source, ASCII text
./capa: ASCII text
./valami: ASCII text
But if it's a cpp file for example it still writes text so I can't use grep to exclude binary files....what should I do?
cppfile is a text file, why do you want to exclude it? – Krzysztof Krasoń Jun 16 '16 at 7:00.cppis text just the same as.c. Why exclude.cppwhen you are including.c? – John1024 Jun 16 '16 at 7:02filesays, they are ASCII text. – John1024 Jun 16 '16 at 7:10