ディレクトリ内を再帰的にgrep
どこを探しても、いろいろなところに取り上げられるトピックスですが、いくつかのやり方
find ./ -name "*php" -exec grep excite {} ;
これだと該当したファイル名が分からないので「/dev/null」を追加する
find ./ -name "*php" -exec grep excite {} /dev/null \;
自分が良く使うのは
find ./ -name "*php" |xargs grep excite
grep excite `find ./ -name "*php"`
こちらの場合は、ファイルが「超」大量にある場合、メモリを食って実行できない場合がある
find ./ -name "*php" -exec grep excite {} ;
これだと該当したファイル名が分からないので「/dev/null」を追加する
find ./ -name "*php" -exec grep excite {} /dev/null \;
自分が良く使うのは
find ./ -name "*php" |xargs grep excite
grep excite `find ./ -name "*php"`
こちらの場合は、ファイルが「超」大量にある場合、メモリを食って実行できない場合がある
by sato025
| 2007-10-17 11:59