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

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:

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:

A.
:!ls -l myfile

B.
:ls -l myfile

C.
esc :ls -l myfile

D.
:?ls -l myfile

Explanation/Reference:
Use "!command" to issue shell commands from the command prompt of vi



Leave a Reply 0

Your email address will not be published. Required fields are marked *