nerdexam
LPI

101-400 · Question #366

While editing a file in vi, you realize that you are changing the wrong file. What vi command sequence will allow you to quit without saving your changes?

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

Question

While editing a file in vi, you realize that you are changing the wrong file. What vi command sequence will allow you to quit without saving your changes?

Options

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

How the community answered

(23 responses)
  • A
    4% (1)
  • B
    83% (19)
  • C
    9% (2)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 101-400 Practice