1、在/tmp目录下,新建目录director新建三个txt文件,分别命名为filel、file2、file3,用vi编辑器分别在三个文件中输入内容。
cd /tmp
mkdir director
cd director
touch file1.txt file2.txt file3.txt
vi file1.txt
i
this one txt!!!
Esc
:wq 回车
cat -n file1.txt 回车
vi file2.txt
i
this tow txt!!!
Esc
:wq 回车
cat -n file2.txt 回车
vi file3.txt
i
this three txt!!!
Esc
:wq 回车
cat -n file3.txt 回车
本文介绍了如何在Linux中使用vi编辑器在/tmp/director目录下新建并编辑file1.txt, file2.txt, 和file3.txt三个txt文件,详细展示了vi的基本操作流程。

被折叠的 条评论
为什么被折叠?



