shell检测 目录中 字符串是否存在

请问 shell 检测/storage/emulated/0/tencent/msflogs/com/tencent/mobileqq/
目录下所有文件的字符串是否包含123456789代码怎么写

参考一下:https://blog.csdn.net/zxc024000/article/details/102914691

如果对你有帮助,可以点击我这个回答右上方的【采纳】按钮,给我个采纳吗,谢谢

`ls -l|grep ^- | awk '{print $9}' | grep "123456789" | wc -l` > 0

先定位到目标文件夹下

cd /storage/emulated/0/tencent/msflogs/com/tencent/mobileqq

然后识别

grep -r '123456789'

这个方法我每天都在用哈哈,从小用到大