Skip to content

Root Fan

Linux & Oracle DBA Blog

  • Home
  • Contact
  • About
  • Index

Category: Linux

Posted on August 7, 2020January 13, 2021

How to Find Text in Files on Linux

If you want to find specific text in a given directory recursively, the best way to do it would be with the grep command and a pattern.

Just like that:

grep -rnw '/path-to-search/' -e 'pattern'

-r or -R is recursive,
-n is line number, and
-w stands for match the whole word.
-l (lower-case L) can be added to just give the file name of matching files.

Continue reading “How to Find Text in Files on Linux”

Unmissable Posts

  • How to Change Processes Parameter in Oracle 19c RAC
  • How to Fix Oracle RAC Resource Unknown State
  • How to Find Alert Log File Location in Oracle
  • How to Change AWR Retention Period in Oracle Database
  • How to Delete a Datafile in Oracle

Recent Posts

  • How to Delete a Datafile in Oracle
  • How to Upgrade PHP on Ubuntu
  • How to Change Processes Parameter in Oracle 19c RAC
  • How to Kill a Session in Oracle RAC Database
  • How to Change AWR Retention Period in Oracle Database

Categories

  • Apache
  • Firewall
  • Linux
  • Oracle
  • Postfix
  • Security
  • Ubuntu

Unmissable Posts

  • How to Change Processes Parameter in Oracle 19c RAC
  • How to Fix Oracle RAC Resource Unknown State
  • How to Find Alert Log File Location in Oracle
  • How to Change AWR Retention Period in Oracle Database
  • How to Delete a Datafile in Oracle

Categories

  • Apache
  • Firewall
  • Linux
  • Oracle
  • Postfix
  • Security
  • Ubuntu
  • Facebook
  • Twitter
  • Email
Privacy Policy Proudly powered by WordPress