What's the best way to find a string/regex match in files recursively? (UNIX)

前端 未结 8 1368

I have had to do this several times, usually when trying to find in what files a variable or a function is used.

I remember using xargs with grep in the past to do t

8条回答
  •  温柔的废话
    2020-12-29 22:23

    I suggest changing the answer to:

    grep REGEX -r .

    The -r switch doesn't indicate regular expression. It tells grep to recurse into the directory provided.

提交回复
热议问题