nerdexam
CompTIA

XK0-001 · Question #158

What command, when issued from a non-root user, will remove all files from the /tmp directory by prompting the user for the root password?

The correct answer is D. su -c "rm -rf /tmp/*". See the full explanation below for the reasoning.

Question

What command, when issued from a non-root user, will remove all files from the /tmp directory by prompting the user for the root password?

Options

  • Aclrtmp
  • Brm -rf /tmp/* -su
  • Csu "rm -rf /tmp/*"
  • Dsu -c "rm -rf /tmp/*"

How the community answered

(30 responses)
  • A
    3% (1)
  • B
    7% (2)
  • C
    10% (3)
  • D
    80% (24)

Community Discussion

No community discussion yet for this question.

Full XK0-001 Practice