在根下创建一个叫做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