当前位置:网站首页>Rhcsa Road
Rhcsa Road
2022-07-06 20:17:00 【Omniscient magical conch】
Homework the next day
Job requirements
7. Delete /tmp/sys/a file .
8. Catalog /tmp Create 4 A catalog , And create one under each of these four directories test Catalog
9. Create a test Catalog , Create a file in this directory , Content writing nano
10. stay /dir Create directory under dir2 And documents file1, Moving files file1 To create test Directory , Put the table of contents dir2 Copied to the test Directory
Symbolic links are also called soft links , And the original file is not a file . for example Windows Shortcut to ,
Characteristics of action : Find a file in the specified path and access it quickly and easily , Delete source file shortcut cannot be accessed
Hard links :
Multiple filenames point to the same Inode
Characteristics of action : Prevent users from deleting by mistake , Backup ( Backup only for file names ), Deleting the source file will not affect the hard link
2
establish aaa
[[email protected] ~]# cd /home
[[email protected] home]# touch aaa
[[email protected] 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
establish a.txt
[[email protected] ~]# cd /
[[email protected] /]# ln -s / a.txt
[[email protected] /]# ll
total 28
lrwxrwxrwx. 1 root root 1 Feb 11 06:59 a.txt -> /
establish A
[[email protected] /]# cd /root
[[email protected] ~]# touch A
[[email protected] ~]# link A A.txt
[[email protected] ~]# ll
total 8
-rw-r--r--. 2 root root 0 Feb 11 07:00 A
3
[[email protected] ~]# cd
[[email protected] ~]# pwd
/root
[[email protected] ~]# touch abc{1..100}
[[email protected] ~]# 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
[[email protected] ~]# touch n.txt
[[email protected] ~]# nano n.txt
[[email protected] ~]# cat n.txt
He love his lover
He love his liker
He like his lover
He like his liker
5
The first column is the file type
6
[[email protected] ~]# mkdir /test/sysroot -p
[[email protected] ~]# ll
total 8
-rw-------. 1 root root 1036 Feb 10 14:33 anaconda-ks.cfg
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
[[email protected] ~]# mkdir /tmp -p
[[email protected] ~]# cd /test/sysroot
[[email protected] sysroot]# ll
total 0
[[email protected] sysroot]# touch a b c
[[email protected] sysroot]# ll
total 0
-rw-r--r--. 1 root root 0 Feb 12 21:16 a
-rw-r--r--. 1 root root 0 Feb 12 21:16 b
-rw-r--r--. 1 root root 0 Feb 12 21:16 c
[[email protected] sysroot]# cd
[[email protected] ~]# mv /test/sysroot /tmp/sys
[[email protected] ~]# ll /tmp
total 20
drwxr-xr-x. 2 root root 33 Feb 12 21:16 sys
[[email protected] ~]# ll /tmp/sys
total 0
-rw-r--r--. 1 root root 0 Feb 12 21:16 a
-rw-r--r--. 1 root root 0 Feb 12 21:16 b
-rw-r--r--. 1 root root 0 Feb 12 21:16 c
7
[[email protected] ~]# cd /tmp/sys
[[email protected] sys]# rm a
rm: remove regular empty file 'a'? y
[[email protected] sys]# ll
total 0
-rw-r--r--. 1 root root 0 Feb 12 21:16 b
-rw-r--r--. 1 root root 0 Feb 12 21:16 c
8
[[email protected] tmp]# mkdir /tmp/b/test -p
[[email protected] tmp]# mkdir /tmp/b/test -p
[[email protected] tmp]# mkdir /tmp/c/test -p
[[email protected] tmp]# mkdir /tmp/d/test -p
[[email protected] tmp]# ll
total 20
drwxr-xr-x. 3 root root 18 Feb 12 21:24 a
drwxr-xr-x. 3 root root 18 Feb 12 21:24 b
drwxr-xr-x. 3 root root 18 Feb 12 21:24 c
drwxr-xr-x. 3 root root 18 Feb 12 21:24 d
9
[[email protected] ~]# mkdir -p /test
[[email protected] ~]# cd /test
[[email protected] test]# touch a.txt
[[email protected] test]# nano a.txt
[[email protected] test]# cat a.txt
nano
10
[[email protected] ~]# mkdir -p /dir
[[email protected] ~]# cd /dir
[[email protected] dir]# mkdir -p /dir2
[[email protected] dir]# touch file1
[[email protected] dir]# ll
total 0
-rw-r--r--. 1 root root 0 Feb 12 21:29 file1
[[email protected] dir]# cd
[[email protected] ~]# mkdir -p /dir/dir2
[[email protected] ~]# cd /dir
[[email protected] dir]# ll
total 0
drwxr-xr-x. 2 root root 6 Feb 12 21:29 dir2
-rw-r--r--. 1 root root 0 Feb 12 21:29 file1
[[email protected] dir]# cp -p file1 /test
[[email protected] dir]# cd /test
[[email protected] test]# ll
total 4
-rw-r--r--. 1 root root 5 Feb 12 21:27 a.txt
-rw-r--r--. 1 root root 0 Feb 12 21:29 file1
[[email protected] test]# cd /dir
[[email protected] dir]# cp -r dir2 /test
[[email protected] dir]# cd /test
[[email protected] test]# ll
total 4
-rw-r--r--. 1 root root 5 Feb 12 21:27 a.txt
drwxr-xr-x. 2 root root 6 Feb 12 21:31 dir2
-rw-r--r--. 1 root root 0 Feb 12 21:29 file1
边栏推荐
猜你喜欢
SQL injection 2
[network planning] Chapter 3 data link layer (3) channel division medium access control
Le lancement du jupyter ne répond pas après l'installation d'Anaconda
A5000 vgpu display mode switching
22-07-05 upload of qiniu cloud storage pictures and user avatars
5. Nano - Net in wireless body: Top 10 "is it possible?" Questions
腾讯T4架构师,android面试基础
New generation garbage collector ZGC
Introduction of Xia Zhigang
夏志刚介绍
随机推荐
leetcode先刷_Maximum Subarray
[cloud lesson] EI lesson 47 Mrs offline data analysis - processing OBS data through Flink
rt-thread i2c 使用教程
logstash高速入口
02 基础入门-数据包拓展
微信小程序常用集合
Tencent T3 Daniel will teach you hand-in-hand, the internal information of the factory
Jupyter launch didn't respond after Anaconda was installed & the web page was opened and ran without execution
枚举根据参数获取值
某东短信登录复活 安装部署教程
What happened to the kernel after malloc() was transferred? Attached malloc () and free () implementation source
Standardized QCI characteristics
Tencent Android development interview, basic knowledge of Android Development
Special topic of rotor position estimation of permanent magnet synchronous motor -- Summary of position estimation of fundamental wave model
持续测试(CT)实战经验分享
Example of applying fonts to flutter
Continuous test (CT) practical experience sharing
爬虫(14) - Scrapy-Redis分布式爬虫(1) | 详解
01 basic introduction - concept nouns
Tencent T4 architect, Android interview Foundation