bug_x

导航

 
--递归查找目录下含有该字符串的所有文件
grep -rn "data_chushou_pay_info"  /home/hadoop/nisj/automationDemand/
 
--查找当前目录下后缀名过滤的文件
grep -Rn "data_chushou_pay_info" *.py
 
--当前目录及设定子目录下的符合条件的文件
grep -Rn "data_chushou_pay_info" /home/hadoop/nisj/automationDemand/ *.py
 
--结合find命令过滤目录及文件名后缀
find /home/hadoop/nisj/automationDemand/ -type f -name '*.py'|xargs grep -n 'data_chushou_pay_info
--------------------- 
作者:BabyFish13 
来源:CSDN 
原文:https://blog.csdn.net/BabyFish13/article/details/79709028 
版权声明:本文为博主原创文章,转载请附上博文链接!

  

posted on 2019-05-23 21:25  bug_x  阅读(7312)  评论(0编辑  收藏  举报