Finding last depth directories inside all directories with the same name
Solution 1:
Answer
find -mindepth 2 . -type d -path "*1*"
Explaination found here
— Option:
-maxdepth levels
Descend at most
levels
(a non-negative integer) levels of directories below the command line arguments.-maxdepth 0
means only apply the tests and actions to the command line arguments.— Option:
-mindepth levels
Do not apply any tests or actions at levels less than
levels
(a non-negative integer).-mindepth 1
means process all files except the command line arguments.— Option:
-depth
Process each directory's contents before the directory itself. Doing this is a good idea when producing lists of files to archive with
cpio
ortar
. If a directory does not have write permission for its owner, its contents can still be restored from the archive since the directory's permissions are restored after its contents.
I got confused between these options.