Using grep to find a file that does not contain a word.

  • Thread starter Alta
  • Start date
  • Tags Tags
    File
1 reply · 23K views · last reply
Alta
Messages
13
Reaction score
0
I have a bunch of files that I want to find the ones that do not contain a word. I think that I can use grep to do this but I am not sure. does anyone know how to do this?
 
Use the -v option to grep to invert the search results.

grep -v "text" *