0
点赞
收藏
分享

微信扫一扫

RHCSA学习第二天

小编 2022-02-13 阅读 82

作业要求

1. 介绍软硬链接的区别
2. 根据要求创建软硬链接文件
在 /home 创建文件为 aaa, 并在 / 目录下创建软链接文件 a.txt ; /root 下创建硬链接文件为A
3. 在当前系统 / 目录下创建 100 个文件(文件名例如: abc1..abc100 )
4. 在 newfifile 文件中编写以下内容
He love his lover
He love his liker
He like his lover
He like his liker
5. 介绍 ll 列出某一个目录的每一列信息分别是什么
6.创建目录/test/sysroot在该目录下创建三个文件a,b,c 之后再将sysroot目录移动到/tmp目录下改名为sys保证目录下三个文件也存在

7.删除 /tmp/sys/a 文件。

8.目录/tmp下创建4个目录,并在这四个目录下分别创建一个test目录

9.创建一个test目录,在该目录下创建一个文件,内容写 nano

10.在/dir下创建目录dir2和文件file1,移动文件file1到上面创建的test目录中,将目录dir2复制到test目录中
 

1.

软链接:
符号链接又叫软链接,和原文件不是一个文件。例如Windows的快捷方式,

作用特点:在指定路径查找某个文件访问快速便捷,删除源文件快捷方式不能访问

硬链接:

多个文件名指向同一个Inode

作用特点:防止用户误删除,备份(仅对文件名备份),删除源文件不会对硬链接造成影响
 

2.

[root@localhost ~]# cd /home
[root@localhost home]# touch aaa
[root@localhost home]# ll
total 4
-rw-r--r--.  1 root   root      0 Feb 11 06:45 aaa
drwx------. 15 redhat redhat 4096 Feb 10 06:50 redhat

[root@localhost ~]# cd /
[root@localhost /]# ln -s / a.txt
[root@localhost /]# ll
total 28
lrwxrwxrwx.   1 root root    1 Feb 11 06:59 a.txt -> /
 
 3.

[root@localhost ~]# cd
[root@localhost ~]# pwd
/root
[root@localhost ~]# touch abc{1..100}
[root@localhost ~]# ll
total 8
-rw-r--r--. 2 root root    0 Feb 11 07:00 A
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc1
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc10
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc100
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc11
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc12
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc13
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc14
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc15
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc16
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc17
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc18
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc19
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc2
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc20
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc21
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc22
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc23
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc24
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc25
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc26
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc27
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc28
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc29
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc3
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc30
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc31
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc32
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc33
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc34
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc35
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc36
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc37
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc38
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc39
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc4
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc40
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc41
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc42
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc43
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc44
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc45
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc46
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc47
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc48
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc49
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc5
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc50
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc51
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc52
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc53
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc54
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc55
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc56
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc57
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc58
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc59
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc6
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc60
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc61
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc62
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc63
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc64
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc65
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc66
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc67
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc68
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc69
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc7
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc70
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc71
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc72
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc73
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc74
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc75
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc76
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc77
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc78
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc79
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc8
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc80
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc81
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc82
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc83
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc84
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc85
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc86
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc87
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc88
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc89
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc9
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc90
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc91
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc92
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc93
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc94
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc95
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc96
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc97
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc98
-rw-r--r--. 1 root root    0 Feb 11 07:02 abc99
-rw-------. 1 root root 1036 Feb 10 14:33 anaconda-ks.cfg
-rw-r--r--. 2 root root    0 Feb 11 07:00 A.txt
drwxr-xr-x. 2 root root    6 Feb 10 07:42 Desktop
drwxr-xr-x. 2 root root    6 Feb 10 07:42 Documents
drwxr-xr-x. 2 root root    6 Feb 10 07:42 Downloads
-rw-r--r--. 1 root root 1308 Feb 10 14:39 initial-setup-ks.cfg
drwxr-xr-x. 2 root root    6 Feb 10 07:42 Music
drwxr-xr-x. 2 root root    6 Feb 10 07:42 Pictures
drwxr-xr-x. 2 root root    6 Feb 10 07:42 Public
drwxr-xr-x. 2 root root    6 Feb 10 07:42 Templates
drwxr-xr-x. 2 root root    6 Feb 10 07:42 Videos

4.

[root@localhost ~]# touch n.txt
[root@localhost ~]# nano n.txt
[root@localhost ~]# cat n.txt
 He love his lover
 He love his liker
 He like his lover
 He like his liker

5.

 

 8.

 

举报

相关推荐

第二天:RHCSA学习

RHCSA第二天

rhcsa第二天

RHCSA第二天作业

RHCSA/Linux基础 第二天

RHCSA(第二天课后作业)

Kotlin学习第二天

java学习 第二天

0 条评论