Search for word in files

find . -type f -exec file ‚{}‘ ;

Runs `file‘ on every file in or below the current directory. Notice that the braces are enclosed in single quote marks to protect them from interpretation as shell script punctuation. The semicolon is similarly protected by the use of a backslash, though ‚;‘ could have been used in that case also.

Example
find ./ -type f -exec grep -i ‚jdtest‘ {} ;

Jan D.
Jan D.

"The only real security that a man will have in this world is a reserve of knowledge, experience, and ability."

Articles: 673