How to find subdirectory named "qt5/plugins"

I need to find the Qt plugins directory, and I've spent an hour looking for a way to find directory names that include a /. There is a ton of 'qt' and if 'qt/plugins' is wrong, I'll need a different format, so I need a general search solution for directory name including a /.

For example, bin/yelp exists on my computer (which I'm using as a test), and none of the command syntaxes I've found with Google will find that.

Ordinarily, I would just figure something like this out, but I've spent over an hour on this.


You can use the find command - using the -path predicate in place of the usual -name (which can never match a pattern containing a / path separator). For example:

find / -path '*/qt/plugins' 2>/dev/null

The leading */ is required because -path matches against the whole path.

You could also use find / -regex '.*/qt/plugins' 2>/dev/null (again matching against the whole path, with .* taking the place of the shell glob's * wildcard) however a regular expression has no advantage for such a simple pattern.