The Baeldung logo
  • The Baeldung LogoLinux Sublogo
  • Start Here
  • About ▼▲
    • Full Archive

      The high level overview of all the articles on the site.

    • About Baeldung

      About Baeldung.

Category upFiles

File Searching » grep

Searching for files and searching within files for particular content is a common task of any user on the system. Learn about some of the basic commands to achieve this using various scenarios and examples.

  • x grep (34)
  • find (27)
  • awk (13)
  • sed (11)
  • ls (8)
  • xargs (6)
  • regex (4)
  • cut (4)
  • sort (4)
  • vim (3)
  • file (3)
  • pdf (2)
  • wc (2)
  • tr (2)
  • Globbing (2)
  • copy-edit (2)

>> Finding Lines With Exactly One Instance of a Specific Character in a File

>> Finding Directories Not Containing a Specific File in Linux

>> How to Print the Line Numbers of Files That Are Searched Through

>> How to Grep From the End of a File to the Beginning

>> How to Find “n” Consecutive Characters in Text

>> Searching for Patterns in Binary Files

>> How to Sort the Files in a Directory Recursively Based on the Last Modified Date

>> Find Binary Files in a Directory

>> Using find to Get the Number of Occurrences of Text Patterns and Files

>> Searching for a String in Git Commits

>> Finding Duplicate Files With the Same Name

>> How to List Files Not Matching a Given String in the Filename

>> How to Find the “n” Most Frequent Words in a File

>> How to Find Lines Exceeding a Certain Length in a File

>> Finding Strings From Binary Files in Linux

>> Show Surrounding Lines Using Grep Command in Linux

>> How to Find Files by the Length of the Filename

>> How to Find All Files Containing a Specific Text Pattern

>> How to grep Without Leading Whitespaces

>> Count Occurrences of Character per Line/Field on Linux

>> Using grep While Excluding Binary Files

>> How to grep Hidden Files and Directories

>> Why Is \d Not Supported by grep’s Regex

>> Search Contents of Multiple PDF Files

>> grep in a tar.gz Archive

>> Search for a Multi-Line Pattern in a File in Linux

>> How To Find Only Text Files in a Directory in Linux

>> Escape Double Quote In Grep

>> Count Occurrences of a Char in a Text File in Linux

>> Exclude Directories With grep

>> Using grep on Files That Match Specific Criteria

>> Search Within Specific File Types Using grep

>> Delete Lines in a Text File That Contain a Specific String

>> Common Linux Text Search

  • ↑ Back to Top
The Baeldung logo

Categories

  • Administration
  • Files
  • Filesystems
  • Installation
  • Networking
  • Processes
  • Scripting
  • Search
  • Security
  • Web

Series

  • Linux Administration
  • Linux Files
  • Linux Processes

About

  • About Baeldung
  • The Full Archive
  • Editors
  • Terms of Service
  • Privacy Policy
  • Company Info
  • Contact
The Baeldung Logo