findの結果をfileコマンドに送って、その結果をgrepしている
$ find ./ -type f -exec file {} \; | grep “with BOM”
単体でfileすると以下の様に「(with BOM)」と結果が返ってくるので、それをgrepで引っ掛ける。ので、手癖でxargs grepとか書くとおかしな話になるので注意
$ file ./contents/readme.md
./contents/readme.md: UTF-8 Unicode (with BOM) text