There is a file named as xyz.json in a folder with a lot of files organized into multiple sub-folders. How to find this file?

$ find /path/to/top/dir -type f -name "xyz.json" -print

This will print the full path of all regular files called xyz.json in the directory structure rooted at /path/to/top/dir.

If you have a locate database that is updated with high enough frequency, you may also try

$ locate "/path/to/top/dir/*/xyz.json"

find /path/to/folder -name xyz.json

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.