Howto: Find A File In Linux Operating Systems

by Vivek Gite on December 15, 2007 · 0 comments

How Do I find a file in Linux operating systems?

You need to use the find command to search for files in a directory hierarchy under Linux operating systems.

find Command Syntax

Open the terminal and type the following commands:

find /dir/to/search -name filename

OR

find /dir/to/search -iname "*.txt"

For example, search a file called foo.c in /home/projects directory, enter:

find /home/projects -name "foo.c"

To find all *.sh file, enter:

find /home/projects -name "*.sh"

To match uppercase and lowercase version of foo.c or FOO.c, enter:

find /home/projects -iname "foo.c"

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 7 + 9 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: