nerdexam
CompTIA

LX0-101 · Question #380

While editing a file in vi, an administrator realizes that the wrong file is being changed. Which of the following vi command sequences will allow the administrator to quit without saving any changes?

The correct answer is B. :q! See the full explanation below for the reasoning.

Question

While editing a file in vi, an administrator realizes that the wrong file is being changed. Which of the following vi command sequences will allow the administrator to quit without saving any changes?

Options

  • A:Q!
  • B:q!
  • C:w!
  • D:wq!

How the community answered

(37 responses)
  • A
    8% (3)
  • B
    70% (26)
  • C
    5% (2)
  • D
    16% (6)

Community Discussion

No community discussion yet for this question.

Full LX0-101 Practice