RHCSA第二次作业

在根下创建一个叫做test的目录,在test的目录下创建三个普通文件file1 file2 file3,给file1创建一个软链接aa,给file2创建两个硬链接,在test目录下创建一个ceshi的目录,在ceshi的目录下创建a1-a8,b1-b8,ac1-ad8的文件。在test目录下创建一个kaoshi的目录,在该目录下创建1-100个文件。在test目录下创建一个qimo的目录,在该目录下创建AA-EE的级联目录。打印出ceshi、qimo、kaoshi的路径

1.在根下创建一个test目录,由于我有了,所以我创建tst

[root@localhost /]# mkdir /tst
[root@localhost /]# cd tst

2.创建三个普通文件file1, file2和file3:

[root@localhost tst]# touch file1 file2 file3
[root@localhost tst]# ll
total 0
-rw-r--r--. 1 root root 0 Nov 11 17:34 file1
-rw-r--r--. 1 root root 0 Nov 11 17:34 file2
-rw-r--r--. 1 root root 0 Nov 11 17:34 file3

3.给file1创建一个软链接aa:给file2创建两个硬链接:

[root@localhost tst]# ln -s file1 aa
[root@localhost tst]# ln  file2 a
[root@localhost tst]# ln  file2 b

4.在test目录下创建一个ceshi目录,并在其中创建指定的文件:

[root@localhost tst]# mkdir ceshi
[root@localhost tst]# cd ceshi
[root@localhost ceshi]# touch a{1..8} b{1..8} ac{1..8} ad{1..8}

5.在test目录下创建一个kaoshi目录,并在其中创建100个文件(1-100):

[root@localhost tst]# mkdir kaoshi
[root@localhost tst]# cd kaoshi
[root@localhost kaoshi]# touch {1..100}

6.在test目录下创建一个qimo目录,并在其中创建级联目录(AA-EE):

[root@localhost tst]# mkdir qimo
[root@localhost tst]# cd qimo
[root@localhost qimo]# mkdir -p AA/BB/CC/DD/EE

7.打印ceshi、qimo和kaoshi的路径:

[root@localhost tst]# pwd qimo
/tst
[root@localhost tst]# pwd kaoshi
/tst
[root@localhost tst]# pwd ceshi
/tst

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值