Directories can be treated the same as files. We can perform exactly the same operations on them and even more. Let us start with a simple command that finds all directories that are not empty.
Find all directories that contain a file a.txt. Note: this is not recursive traversation. The next 5 snippets of code also do not apply recursiveness.
Find all directories that contain three files: a.txt, b.txt, c.txt. They have to contain all these files at once.
Find all directories that contain at least three files.
Find all directories that contain at least one file.
Find all directories that contain at least one file with specified extension.
Find all directories that contain at least one mp3 file.
Find all directories that contain at least one file data.txt in their entire directory trees.
Two recent commands apply Asterisk Patterns. This is another broad topic explained here.
Next