我正在寻找一个函数名,文件夹结构很深,但有很多文件要查看。
通常我会选择类似的方法,find * | grep functionname
但这是最好的方法吗?
gee*_*aur 15
$ find . -type f -print0 | xargs -0 grep foo
$ grep -r foo . # GNU grep only
Run Code Online (Sandbox Code Playgroud)
并zsh
与setopt extendedglob
,
$ grep foo **/*(.)
Run Code Online (Sandbox Code Playgroud)