[Level 2] How to get root permission to write file.

If you want to get root permission when you launch vim with normal user. You could try the following command in vim. 1. to write to file. 2. reload the file.
:w !sudo tee [file_name]
:e!

Wish this helps.

regards,
Stanley Huang

Comments

Popular posts from this blog

[Level 3] Install Memcached Storage Engine for MySQL on CentOS 5.4

[Level 1] How to install Jython on Ubuntu.

[Level 2] Shell Interactive With Zenity Episode 4 -- file-selection