Using vi, you want to save changes to the file my file with :w!, but vi complains it cannot 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-I myfile
B.
:\ls-l myfile
C.
esc :Is -I myfile
D.
:?ls-l myfile
Explanation:
You can execute the external commands in vi editor using :! command . Example: !ls -l displays
all contents of current directory.