When you've made modifications to a file in vi(1) and then find that

you can't write it, type ``!rm -f %'' then ``:w!'' to force the

write

This won't work if you don't have write permissions to the directory

and probably won't be suitable if you're editing through a symbolic link.

If you have sudo(8) installed and permissions to use it, type

``w ! sudo tee %'' to force a write.

Reply to this note

Please Login to reply.

Discussion

No replies yet.