首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

怎样层级搜索匹配字符串解决方案

2012-04-03 
怎样层级搜索匹配字符串grep -l PROD10 /u1/PROD90/prod90mgr/*只能搜索 /u1/PROD90/prod90mgr/* 这一层

怎样层级搜索匹配字符串
grep -l 'PROD10' /u1/PROD90/prod90mgr/*

只能搜索 /u1/PROD90/prod90mgr/* 这一层包含 'PROD10' 的文件,不能搜索所有子文件夹。

[解决办法]
-R, -r, --recursive
Read all files under each directory, recursively; this is equivalent to the
-d recurse option.

[解决办法]
find /u1/PROD90/prod90mgr/* | xargs grep -l 'PROD10'

热点排行