LINUX技巧-查找路径下文件中含有某字符串的文件及其路径

来源:互联网 发布:sap软件咨询顾问 编辑:程序博客网 时间:2024/06/01 20:31

查找路径下文件中含有某字符串的文件及其路径

find /opt/DATA/src -name '*.sh' | xargs grep 'dwh_cook'

Example:
查询某目录下含有 ‘dwh_app_logins_push’ 的 sh 脚本

find /opt/DATA/goldmine/src/ -name '*.sh' | xargs grep 'dwh_app_logins_push'
原创粉丝点击