How to Search a File in Linux?
Contents

How do I search for a file in Linux?

To search /etc/passwd file for the user harry, enter the following command.

If you want to search for a word, and avoid matching substrings use ‘-w ‘option.

Just doing a normal search will show all the lines.

The following example is the regular grep where it is searching for “is”.

How do you search for a file?

Click on the drop-down list above the Search text field and select the Files option. The search results are shown below the Search text field. Scroll down through the list of search results to find the file you are looking for, then click the file name to open it.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest