Home Blog Archive Software In Linux after Text find in files - how to

In Linux after Text find in files - how to

  • Oct 02, 2025
  • 487
  • 0

In this practice tip, you will learn how to search in Linux Text files.

Search with "grep" for Text in files

You can open the console by pressing the key combination [Ctrl] + [Alt] + [T] or type in the search bar "Terminal" and confirm.
  • Type "grep 'word' ./" a. In this command, Linux will search for all files in the current directory that include the term "word". Don't be surprised if the search takes a while. Depending on how big the directory is, the search takes some time.
  • You want to refer to sub-directories included, further helps you with the parameters "-r". A search would look like this, so "grep -r 'word' ./".
  • Currently, Linux searches are still case-sensitive, i.e. does it respect the use of upper and lowercase letters. To prevent this, add the command Parameter "-i".
  • You can use a regular expression to replace "grep" with "egrep".
  • As output you get the file path to the Files that contain the search pattern.
Linux: Text in files search
Do you want to with the files then continue to work, to learn, in a further practical tip, as files under Linux together.

YOU MAY ALSO LIKE

0 COMMENTS

LEAVE A COMMENT

Human?
1 + 3 =