1818IP-服务器技术教程,云服务器评测推荐,服务器系统排错处理,环境搭建,攻击防护等

当前位置:首页 - Linux系统 - 正文

君子好学,自强不息!

linux怎么修改文件内容?

2022-05-19 | Linux系统 | 1818ip | 342°c
A+ A-

修改linux文件内容的方法

1、进入文件:vim 文件名

vim /test/vi.test
Having knowledge 11 kes having pregnant ,
it takes times to be awareness.
Mom said you'd better not miss two things,
the 1ast bus. to home and the person who 1oves you deeply .
A good 1ove is you find the wor1d for a man;
a bad 1ove is you abandon the wor1d for a man.
~
~
~
''/test/vi. txt" 6L,265C

刚打开文件时 Vim 处于命令模式,此时文件的下方会显示文件的一些信息,包括文件的总行数和字符数,以及当前光标所在的位置等

2、查找待修改内容位置 

(1)shift+":",使文件变成可查询状态

(2)输入 /查询内容 (eg 查询Directory参数,即 /Directory)

3、找到位置后修改:按键盘 i 键 即变成可编辑状态

4、修改文件内容后,按ESC键退出编辑状态

5、保存修改:

wq!

以上就是怎么修改linux文件内容的详细内容,更多请关注1818ip.com其它相关文章!


本文来源:1818IP

本文地址:https://www.1818ip.com/post/974.html

免责声明:本文由用户上传,如有侵权请联系删除!

发表评论

必填

选填

选填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。