Quick tip: Finding subfolders

When organizing folders it can be needed to find out if and which folder has subfolders.

Let’s say we have the following folder layout:

 - subfolder1
 - subfolder2
 disk 2
 - subfolder3
 disk 3

Finding the folders which has subfolders is pretty easy:

find . -mindepth 2 -type d

Adjust the mindepth parameter to your needs. In the given case, it outputs: