I was using this line to find the phrase, 'B206' within files in the directory I was in and all of its sub directories.
find . -exec grep -s "B206" '{}' \; -print
It crashes when it tries to read certain files and actually changes the title bar in putty to a bunch of weird characters
For example, it crashes all the time when it hits a jpg file that's in a sub directory. The title bar changes, and in the screen, there exists:
ÐF»*rkNQeË+Z׳kU£~MÞçÄZ½ªéúýØâÑn¡[U+Þ4ªÒ9/ê£<ú¯4}[IÓîÃ¥K»G%ݳ¢
Forcing me to Ctrl+C out back to the prompt and then exit out.
Any way to add code to this line that will exclude jpg files? Even better, a piece of code where I can add a list of extensions to exclude?
EDIT:
-not & -I do not work for me
I found this similar question also related somewhat to mine