Linux基础---第三天作业--目录创建,vim操作

本文介绍了Linux基础操作,包括创建目录test及其子目录,使用touch和vim创建并编辑文本文件,文件拷贝、软硬链接的区别,以及文件删除。同时,讲解了如何使用echo命令结合管道将内容输出到文件,以及cat、more、less、head和tail命令对文件内容的查看方式。
摘要由CSDN通过智能技术生成

1:创建目录test:

·使用两种方式在test目录中创建文本文件text1.txt,text2.txt

(1):第一种方式:touch

[root@localhost ~]# mkdir test
[root@localhost ~]# cd test/
[root@localhost test]# touch text1.txt
[root@localhost test]# ls
text1.txt
[root@localhost test]#

(2):第二种方式:vim / vi

[root@localhost ~]# mkdir test
[root@localhost ~]# cd test/
[root@localhost test]# vim text2.txt
[root@localhost test]# ls
text2.txt
[root@localhost test]#

·使用vim在文件text1.txt中写入

Welcome to my Linux.

You are the best.

This is my first file to create on linux.

 新文件:

[root@localhost test]# ls
new_test1.txt  text1.txt  text2.txt
[root@localhost test]# cat new
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值