In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories?
A
-dirmax
B
-maxdepth
Correta
C
-maxlevels
D
-n
E
-s
Explicação Oficial / Explicações da Comunidade
The find command in Linux is used to search for files and directories within a directory hierarchy. The -maxdepth option restricts the search to a specified number of subdirectory levels. For example, find /path -maxdepth 2 will search only the starting directory and its immediate subdirectories, but not deeper. This is useful for limiting the scope of a search to avoid traversing large directory trees.