How to Search for a File in Red Hat


Red Hat is one of Linux's many "distributions." Linux is an open-source operating system with many different versions all running on the same basic UNIX-like framework. You can therefore search for a file in Red Hat the same way you search for a file in any other version of Linux or other UNIX-like operating system: by opening a terminal and using the simple "find" command.

  • Open Red Hat's main menu, click "System Tools," then click "Terminal." This brings up a terminal window in which you can type text commands to the operating system.

  • Type the following command:

    find /home/user/directory -name "file.txt" -print

    The first parameter after "find" should be the directory you want to search. If you want to search the entire filesystem, just use "/" -- this is the root directory. After the "-name" switch, enter the filename you want to search for in quotes. Note that you can use wildcards here -- "report" will find all files beginning with "report," for example, while ".txt" will find every file with a "txt" extension. Finally, the "-print" switch tells the operating system to print the locations of the files on the screen. This switch is unnecessary in some versions of Red Hat, but it can't hurt.

  • Press "Enter" to complete the command and view the search results.

Related Searches


Promoted By Zergnet


You May Also Like

  • How to Find Files on a Server

    One of the benefits in using a server is the ability to organize and store digital files. As a result, every server...

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!