常用CentOS的文件Vi编辑命令

按ESC键 跳到命令模式,然后:文章源自原紫番博客-https://www.yuanzifan.com/54646.html

:w 保存文件但不退出vi文章源自原紫番博客-https://www.yuanzifan.com/54646.html

:w file 将修改另外保存到file中,不退出vi文章源自原紫番博客-https://www.yuanzifan.com/54646.html

:w! 强制保存,不推出vi文章源自原紫番博客-https://www.yuanzifan.com/54646.html

:wq 保存文件并退出vi文章源自原紫番博客-https://www.yuanzifan.com/54646.html

:wq! 强制保存文件,并退出vi文章源自原紫番博客-https://www.yuanzifan.com/54646.html

q: 不保存文件,退出vi文章源自原紫番博客-https://www.yuanzifan.com/54646.html

:q! 不保存文件,强制退出vi文章源自原紫番博客-https://www.yuanzifan.com/54646.html

:e! 放弃所有修改,从上次保存文件开始再编辑文章源自原紫番博客-https://www.yuanzifan.com/54646.html

文章源自原紫番博客-https://www.yuanzifan.com/54646.html
 

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证