Skip to main content
Maher Sakka's Blog
Main navigation
  • Home
  • Contact me
Language switcher
  • English
  • عربي
Breadcrumb
  1. Home
  2. Blog
  3. How To Find Files That Contain Specific Text In Linux

How to find files that contain specific text in Linux

Image

To search for a specific text on a Linux system, the grep command can be used according to the following syntax:

grep -iRl "text_to_search" ./

The basic parameters are:

  • i: ignore text case (uppercase or lowercase)
  • R: search recursively in subfolders files
  • l: show file names instead of parts of the file contents

The folder path to be searched is specified last.

The grep command has other parameters that may be useful for searching, such as:

  • n: display the line number
  • w: match all search text

Some examples of grep usage:

grep "sodium.so" /etc/php/7.2/apache2/php.ini
grep -iRl "memory_limit" /

 

 

Tags
  • Linux
Related posts
  • How to know which ini configuration files are loaded with PHP
  • How to prevent search engines from indexing your staging server websites
  • How to Find Recently Modified Files in Linux
  • How to determine which Linux distribution and kernel version you are running
  • How to compress and decompress files in Linux with ZIP
Tags
  • Laravel
  • Linux
  • Drupal
  • Database
  • Tips & Tricks
  • Mobile
  • Servers
  • SEO
Recent posts
  • How to detect tables wihtout primary key in a database
  • How to know which ini configuration files are loaded with PHP
  • How to prevent search engines from indexing your staging server websites
Monthly archive
  • May 2017 (2)
  • August 2018 (1)
  • October 2020 (1)
  • August 2023 (1)
  • July 2024 (2)
  • November 2024 (1)
  • July 2025 (10)
  • October 2025 (6)
Projects
  • elmanager.tn
  • 365mathex.com
  • vpop.tn
  • toufoula.tn
  • writethemoney.com
  • dinartunisien.com
RSS feed

mahersakka.com © 2024 
Build Your IT Skills, Grow Your Wealth with Maher Sakka