find /tmp -name "*.py"

The example above is using the find command to search files in the tmp folder for Python files, that have the extension .py.

To get a list of all the files with the same extension inside the current directory, for this example looking for all the Python extension files.

find . -type f -name "*.py"

In the above example the . denotes for the current directory. find searches recursively in all the directories below the given path

Darryl Dias

I’m Darryl. I’m a 3D Artist, Web Developer and Linux enthusiast. On this site I share my insights, tips and tricks, tutorials, methods and best practices.

Leave a comment

Your email address will not be published.