Posted By

noah on 07/06/09


Tagged

file Shell Bash search pattern String text commandline match grep FileSystem find not negative


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

mbria


Grep for files that do not match a pattern


 / Published in: Bash
 

URL: http://www.gnu.org/software/grep/manual/html_node/Usage.html

The -L option lists files that do not contain a line matching the pattern given.

  1. grep -L "the pattern" *
  2.  
  3. # to recurse into subdirectories
  4.  
  5. grep -RL "the pattern" *

Report this snippet  

You need to login to post a comment.