> ## Content Index
> Fetch the complete content index at: https://kudithipudi.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# HOW TO : List files that don't contain a string using find and grep
- URL: https://kudithipudi.org/how-to-list-files-that-dont-contain-a-string-using-find-and-grep/
- Published: 2012-03-30T20:32:34.000Z
- Updated: 2012-03-30T20:32:34.000Z
- Description: If you run into a situation, where you need to search through a bunch of files and print the names of the files that don’t contain...
- Author: admin
- Tags: HOWTO, Linux, Uncategorized, #wp, #wp-post, #Import 2026-08-23 02:32

If you run into a situation, where you need to search through a bunch of files and print the names of the files that don’t contain a particular string, here is how you do it in Linux

```
find -name PATTERN_FOR_FILE_NAMES | xargs grep -L STRING_YOU_ARE_SEARCHING_FOR
```

The -L option for grep does this (according to the manual)

> 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.