Your Question: How Do I Search for Multiple Text Files in Linux?
Contents

To search multiple files with the grep command, insert the filenames you want to search, separated with a space character. The terminal prints the name of every file that contains the matching lines, and the actual lines that include the required string of characters. You can append as many filenames as needed.

How do I search multiple text files at once?

Go to Search > Find in Files (Ctrl+Shift+F for the keyboard addicted) and enter:

  1. Find What = (test1|test2)
  2. Filters = *. txt.
  3. Directory = enter the path of the directory you want to search in. You can check Follow current doc. to have the path of the current file to be filled.
  4. Search mode = Regular Expression.

How do I search for a text file in Linux?

If you need to know how to find a file in Linux called thisfile.txt, it will look for it in current and sub-directories. Look for all .jpg files in the /home and directories below it. Look for an empty file inside the current directory.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest