You want to save vi changes to the file myfile with :w!, but vi complains it can not write to the file. To do
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: