nerdexam
LPI

101-400 · Question #274

You want to save vi changes to the file myfile with :w!, but vi complains it can not write to the file. Therefore, you want to check the write permissions on the file. To do this without leaving vi…

The correct answer is A. :!ls -l myfile. See the full explanation below for the reasoning.

Question

You want to save vi changes to the file myfile with :w!, but vi complains it can not write to the file. Therefore, you want to check the write permissions on the file. To do this without leaving vi, you type:

Options

  • A:!ls -l myfile
  • B:\ls -l myfile
  • Cesc :ls -l myfile
  • D:?ls -l myfile

How the community answered

(55 responses)
  • A
    71% (39)
  • B
    16% (9)
  • C
    7% (4)
  • D
    5% (3)

Community Discussion

No community discussion yet for this question.

Full 101-400 Practice