How to locate a file in Linux with find

- by

Need to find a file on your system? Look no further than the excellent find command line tool.

Here’s how to use it:

find / -name 'yourfilename.extension'

This brings up a list of every file whose name matches “yourfilename.extention”. Wildcards are allowed, so you could list every .log file on the system like this:

find / -name '*.log'

The forward-slash just after find command lets you specify where to start your search. So forward-slash (i.e. ‘/’) means you’re looking everywhere. You can specify a directory like this:

find /path/to//your/directory -name '*.log'

Find is a complex command – have a look at what else it has to offer:



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site witout any pesky ads! More details here.

Add your voice!

This site uses Akismet to reduce spam. Learn how your comment data is processed.