查找没有特定行的文件

Sri*_*mar 4 unix grep command-line

以下命令列出了具有上述行的所有文件(带行):

$ grep  "\[oow\] running" *.log
Run Code Online (Sandbox Code Playgroud)

但是,我想知道的是所有没有该行的 *.log 文件。使用-vgrep 选项打印无数其他行。但我只想要没有提到的行的文件。通常如何在 Unix/Mac 中执行此操作(当然是在命令行中)?

djh*_*ell 10

使用 -L 选项:

-L, --files-without-match
       Suppress  normal  output;  instead  print the name of each input
       file from which no output would normally have been printed.  The
       scanning will stop on the first match.
Run Code Online (Sandbox Code Playgroud)