QuestionQ123

Infrastructure and Automation

After a project has been migrated to a new codebase, the old_project directory must be removed. The directory contains multiple read-only files and must be deleted recursively without a confirmation prompt. Which Bash command must be used?

  • A rmdir -p old_project
  • B rm -rf old_project
  • C rm -r old_project
  • D rmdir old_project
Explanation

rm -r recursively removes a directory and its contents. The -f option forces deletion and suppresses confirmation prompts for write-protected files, so rm -rf old_project removes the complete directory tree noninteractively.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!