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

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.

  • grep (33)
  • find (25)
  • awk (13)
  • sed (10)
  • ls (6)
  • xargs (6)
  • cut (4)
  • sort (4)
  • vim (3)
  • file (3)
  • regex (3)
  • wc (2)
  • tr (2)
  • Globbing (2)
  • copy-edit (2)

>> Finding Directories Not Containing a Specific File in Linux

>> Exclude “Permission denied” Messages in find Command Output

>> What Makes locate Faster Than find

>> Guide to Incremental Search in Vim

>> 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 Match a Pattern “N” Times Using sed

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

>> How to Auto Delete Files Older Than N Days

>> How to Find Files with Non-Printable and Non-ASCII Characters in Their Names

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

>> The Differences Between BRE, ERE, and PCRE Syntax in Linux

>> Show Surrounding Lines Using Grep Command in Linux

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

>> Breadth-First Search in a Directory

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

>> How to grep Without Leading Whitespaces

>> Navigating in a File in Vim

>> Why Looping Over find’s Output Is a Bad Practice

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

>> Using grep While Excluding Binary Files

>> How to grep Hidden Files and Directories

>> Find Matching Text and Replace the Next Line

>> Difference Between awk, nawk, gawk and mawk

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

>> Linux Find Command With Regular Expressions

>> How to Check if a File Type Exists in a Directory

>> Get Unique Values from an Array in Bash

>> Exclude Certain Paths With the find Command

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

>> Count All the Lines of Code in Directory

>> Escape Double Quote In Grep

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

>> How To Compare Two Directories on Linux

>> Exclude Directories With grep

>> List the Size of Each File and Directory, and Sort by Size in Linux

>> Find and Delete Files and Directories

>> Using grep on Files That Match Specific Criteria

>> Find Files Not Owned by a Specific User in Linux

>> Introduction to Bash Globbing

>> Evaluate XPath in the Linux Command Line

>> Filtering Files Copied When Using rsync

>> Using the find -exec Command Option

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