nerdexam
CompTIA

XK0-006 · Question #48

An administrator needs to remove the directory /home/user1/data and all of its contents. Which of the following commands should the administrator use?

The correct answer is C. rm -r /home/user1/data. The rm -r command recursively removes a directory and all of its contents (files and subdirectories), which is required for deleting /home/user1/data.

System Configuration and Management

Question

An administrator needs to remove the directory /home/user1/data and all of its contents. Which of the following commands should the administrator use?

Options

  • Armdir -p /home/user1/data
  • Bln -d /home/user1/data
  • Crm -r /home/user1/data
  • Dcut -d /home/user1/data

How the community answered

(46 responses)
  • A
    2% (1)
  • B
    7% (3)
  • C
    89% (41)
  • D
    2% (1)

Explanation

The rm -r command recursively removes a directory and all of its contents (files and subdirectories), which is required for deleting /home/user1/data.

Topics

#rm#directory removal#file management#command line

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice