linux 使用find命令查找包含某字符串的文件_beijihukk的博客-CSDN博客_find 查找字符串 ---- mac 也适用

一直记不住

find .|xargs grep -ri "要查找的字符串"

find . -name '*MapperEx.xml'| xargs  grep -ri "insertSelective"   
resources git:(master) ✗ find . -name '*MapperEx.xml'| xargs  grep -ri "insertSelective"        
./mappers/accounting/AccountingAppealMapperEx.xml:        <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.accounting.AccountingAppeal">
./mappers/organisation/SysEnterpriseExtInvoiceMapperEx.xml:    <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.organisation.SysEnterpriseExtInvoice">
./mappers/organisation/SysEnterpriseExtAccountingMapperEx.xml:    <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.organisation.SysEnterpriseExtAccounting">
./mappers/base/UnifiedOrderReturnCreditMapperEx.xml:    <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.base.UnifiedOrderReturnCredit">
./mappers/base/UnifiedOrderCreditMapperEx.xml:    <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.base.UnifiedOrderCredit">
./mappers/base/UnifiedOrderGoodsMapperEx.xml:    <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.base.UnifiedOrderGoods">

统计多少个

find . -name '*MapperEx.xml'| xargs  grep -ri "insertSelective" | wc -l
       6

原网址: 访问
创建于: 2021-01-20 11:57:52
目录: default
标签: 无

请先后发表评论
  • 最新评论
  • 总共0条评论