标签:vim
1. creat newfile sudo vim newfile
read file sudo vim filename(if this file is not exist,creat a new one) and no houzhuiming
sudo vim /etc/passwd system account
2.change the owner of file
sudo chown user file
sudo chown root newfile
exit
3. editing and navigatating
insert: ‘a‘
get out insert moden: ‘esc‘
find sth,seach: :/ *max* notice space max means what are you looking for
:/ ?
hit ‘n‘ : go to the next search
4. command in vim
open file: :e file
colse file :q! (no change,no save)
:wq (save and close) back to system ,quit vim
:w filename (save as another file)
本文出自 “SystemAdmin成长记” 博客,请务必保留此出处http://christhai.blog.51cto.com/1584747/1693245
标签:vim
原文地址:http://christhai.blog.51cto.com/1584747/1693245