vi <file> :新建文件,进入vi编辑器界面。需要按i进入insert模式,按Esc退出。
- ZZ (Note: capitals) - Save and exit
- :q! - discard all changes, since the last save, and exit
- :w - save file but don't exit
- :wq - again, save and exit
- :x -保存并退出
- :q - 当未对文件进行修改时,退出quit
chmod number file_name:改变file_name的权限,number为555是只读,755是可以读写执行