101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 102


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?

Show Answer
Correct Answer: A

In a nested directory structure, the 'find' command line option used to restrict the command to searching down a particular number of subdirectories is '-maxdepth'. The '-maxdepth' option takes a non-negative integer argument that specifies the maximum levels of directories to descend below the starting points.

Discussion

3 comments
Sign in to comment
LazylinuxOption: A
Apr 7, 2022

A definitely and it is in MAN page, there are both maxdepth and mindepth

serbal
Mar 10, 2020

doesn't find any information in man pages in my distr

cast7omadrid1
Mar 12, 2020

http://man7.org/linux/man-pages/man1/find.1.html my recommendation is that if you have any doubts, look for the man page directly in google.

minajahan
Jun 15, 2020

-maxdepth levels Descend at most levels (a non-negative integer) levels of directories below the starting-points. -maxdepth 0 means only apply the tests and actions to the starting-points themselves.

iwkno6
Jul 28, 2021

check 'find' manpage, and search for maxdepth, there's a section for it called -maxdepth levels

AmycertOption: A
Feb 8, 2023

It is A i checked the --help