Linux Administration
medium

Pregunta de Linux Administration #019e3987

Enunciado de la Pregunta
Linux Administration
#find
#maxdepth
#directory-traversal
#search-depth
Medio

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

Correcto
C

-maxlevels

D

-n

E

-s

Explicación Oficial / Explicaciones de la Comunidad

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.