Question 560
A review of this RHEL 10 task finds: A cleanup script deletes a directory using a command suitable for empty directories, but the target still contains files. Which caution is most directly relevant to completing the task safely?
Explanation
Correct Answer
The applicable caution is that A command that removes empty directories is not equivalent to unrestricted recursive deletion. This matters because a cleanup script deletes a directory using a command suitable for empty directories, but the target still contains files. The targeted check is to inspect directory contents and identify the actual approved deletion scope, followed by an authorized change to remove only the approved files and then the empty directory using the proper operations. Unrelated operational warnings do not address this specific failure mechanism.
Incorrect Answers
Moving a source file is not a safe substitute for copying when both instances must remain. The check concerns moving a source file is not a safe substitute for copying when both instances must remain, not confirming that a command that removes empty directories is not equivalent to unrestricted recursive deletion.
Redirecting output to a file and piping a process are different data-flow operations. This assesses redirecting output to a file and piping a process are different data-flow operations; it does not determine the reported condition—a cleanup script deletes a directory using a command suitable for empty directories, but the target still contains files.
Ordinary mkdir without parent creation may fail for a deep missing path. The case-specific requirement is confirming that a command that removes empty directories is not equivalent to unrestricted recursive deletion, which that option does not establish.