Finding all files with a certain extension in Linux?

find /tmp -name "*.py"
Code language: Bash (bash)

The example above uses 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, look for all the Python extension files for this example.

find . -type f -name "*.py"
Code language: Bash (bash)

In the above example, the. Denotes the current directory. find Searches recursively in all the directories below the given path