101-400 Exam QuestionsBrowse all questions from this exam

101-400 Exam - Question 36


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: B

The find command line option used to restrict the command to searching down a particular number of subdirectories is -maxdepth. This option allows you to specify the maximum depth of directories to search. For example, using -maxdepth 2 would restrict the search to the current directory and its immediate subdirectories.

Discussion

1 comment
Sign in to comment
DuboisNicolasDuclairOption: C
Oct 21, 2023

The `find` command line option used to restrict the command to searching down a particular number of subdirectories is: B. `-maxdepth` You can use the `-maxdepth` option followed by the number of levels to limit how deeply `find` will search within the directory structure. For example, to search only one level deep, you can use `-maxdepth 1`.