Bash在目录中的文件/文件中查找代码行

Bar*_*ers 3 linux directory bash shell

我怎样才能找到这条线:

 print("hello world)"
Run Code Online (Sandbox Code Playgroud)

x/y/z目录中,文件/文件可以位于x树的任何分支中(其中目录x有许多子文件夹)

anu*_*ava 6

您可以使用以下grep父目录的递归x:

grep -FR 'print("hello world)"' x/*
Run Code Online (Sandbox Code Playgroud)