About 1,920,000 results
Open links in new tab
  1. How to Exclude in Grep - Linuxize

    May 18, 2021 · In this article, we’re going to show you how to exclude one or multiple words, patterns or directories when searching with grep.

  2. regex - How can I exclude one word with grep? - Stack Overflow

    Dec 27, 2010 · If you want to bring the regex power into the exclude pattern, just add -E. e.g. grep -v -E "unwanted_pattern_in_regex" file

  3. How to Exclude Patterns, Files, and Directories With grep

    Jun 22, 2022 · We could use an --exclude option for each file type, but we can achieve what we want more efficiently by grouping the file types. This command excludes all files that have CSV or MD …

  4. Grep Exclude: How To Use -v To Exclude Words, Patterns, or Files in Grep

    Aug 17, 2023 · To exclude files or directories, you can use the '--exclude' or '--exclude-dir' option followed by the file or directory name. For instance, `grep -r --exclude='*.txt' pattern .` will search for …

  5. How to Exclude Matches with Grep in Linux: An In-Depth Guide

    Oct 24, 2023 · In this comprehensive guide, you‘ll learn different methods to exclude matches with grep. I‘ll provide plenty of clear examples so you can master grep pattern exclusion.

  6. grep Cheat Sheet - grep Command Line Guide

    Mar 15, 2025 · With options for recursive searches, regular expressions, and output customization, grep offers flexibility for a wide range of tasks. Whether you’re filtering logs, analyzing data, or debugging …

  7. grep (1) - Linux manual page - man7.org

    This enables a calling process to resume a search. When grep stops after NUM matching lines, it outputs any trailing context lines. When the -c or --count option is also used, grep does not output a …

  8. linux - grep for "term" and exclude "another term" - Super User

    I am trying to build a grep search that searches for a term but exludes lines which have a second term. I wanted to use multiple -e "pattern" options but that has not worked.

  9. How to Exclude Using grep - phoenixNAP

    Jul 10, 2025 · This tutorial explained how to exclude different items using grep. It elaborated on the grep syntax for exclusion and provided examples of how to exclude a single pattern, multiple patterns, …

  10. How to exclude matches in grep - LabEx

    This tutorial will guide you through understanding Grep basics, leveraging its inverse matching capabilities, and exploring practical Grep filtering techniques.