Suppose I don't know where my Django source is stored, but I know that it contains these directories in this way: django/contrib/admin.

How can I use the find command or any more appropriate coreutils command to find where this partial directory path (structure) is available?

Example output:

  • The locate command does this for you, assuming that its database is up to date. Jan 21, 2019 at 9:52

2 Answers 2


You should use -path flag for such purpose

find /home/me  -path "*django/contrib/admin*"

For people who don't have the -path option (ex: vanilla AIX install, and no GNU find installed), here is another (simple) solution:

find /home/me -print | grep "django/contrib/admin"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .