This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / Unix command 菜鸟问题,谢谢如何,在一个目录及其子目录下找出所有包含"ABC" 的文件, GREP 了老半天都没得出结果.
-waiting(OK);
2005-3-22
{81}
(#2196009@0)
-
find . -exec grep -l ABC {} \;
-pasu(InTheSky);
2005-3-22
(#2196018@0)
-
thanks
-waiting(OK);
2005-3-22
(#2196023@0)
-
or, you can grep -r --include=* ABC *
-canadiantire(轮胎-M.I.N.K.);
2005-3-30
(#2210686@0)
-
not right. It should be grep . -r ABC *
-qulaopo(娶老婆);
2005-4-1
(#2214827@0)
-
Have you ever tried?
-canadiantire(轮胎-M.I.N.K.);
2005-4-1
(#2214835@0)
-
Tried on Debian Linux and got error message as
grep: unrecognized option `--include=ABC'
-qulaopo(娶老婆);
2005-4-1
(#2214858@0)
-
correct in Linux, but not valid in solaris 9.--include=PATTERN
Recurse in directories only searching file matching
PATTERN.
-647i(路遇*神,卡片遗失一);
2005-4-1
{108}
(#2214844@0)
-
find . -name * | xargs grep "ABC"
-henryxy(亨利大帝);
2005-4-1
(#2214923@0)