正解:B
Explanation
The find command is used to search for files and directories that match certain criteria. The option -maxdepth can be used to restrict the command to searching down a particular number of subdirectories. The argument to
-maxdepth is a positive integer that specifies the maximum depth of the directory tree to be searched. For example, -maxdepth 0 means only the current directory, -maxdepth 1 means the current directory and its direct subdirectories, and so on1. The option -maxdepth should be placed before any other expressions, as it affects the behavior of the whole command2. For example, to find all the files with the extension .txt in the current directory and its direct subdirectories, the command would be:
find . -maxdepth 1 -type f -name "*.txt"
The other options are not correct because:
* A. -dirmax is not a valid find option.
* C. -maxlevels is not a valid find option.
* D. -depth is a valid find option, but it does not restrict the command to searching down a particular number of subdirectories. It only changes the order of the search, so that the files and directoriesare processed in depth-first order, meaning that the contents of a directory are processed before the directory itself1. References:
* find(1) - Linux manual page
* How to use find command to search for multiple extensions - Unix & Linux Stack Exchange