Linux: How can I find a file on my system?

by on September 28, 2006 · 1 comment· last updated at December 27, 2006

Q. I have remove server. I login through SSH program. How do I find a file called xyz on my Linux server system?

A. You can use find command. It search for files in a directory hierarchy under Linux and all other UNIX like oses. Use find command to find a file from shell prompt.

Find command syntax

find Search-Directory-Path -name file-name-to-search

Examples

To find a file called zyz in /home/user directory type the command:
$ find /home/user -name xyz

To find a file called passwd in / (search entire system) directory type the command:
$ find / -name passwd

See this previous article for more info.



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 1 comment… read it below or add one }

1 Hoff123 February 11, 2013 at 7:38 pm

Awesome! Thank you so much. This will definitely come in handy sometime(and right now…when I googled how to do it…lol) :).

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as:

Previous Faq:

Next Faq: