当前位置:网站首页>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
边栏推荐
- [network planning] Chapter 3 data link layer (3) channel division medium access control
- 系统与应用监控的思路和方法
- [cloud native and 5g] micro services support 5g core network
- 【计网】第三章 数据链路层(4)局域网、以太网、无线局域网、VLAN
- 持续测试(CT)实战经验分享
- An East SMS login resurrection installation and deployment tutorial
- Continuous test (CT) practical experience sharing
- recyclerview gridlayout 平分中间空白区域
- HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
- Tencent T2 Daniel explained in person and doubled his job hopping salary
猜你喜欢

Anaconda安裝後Jupyter launch 沒反應&網頁打開運行沒執行

New generation garbage collector ZGC

Leetcode question 283 Move zero

【计网】第三章 数据链路层(3)信道划分介质访问控制

5. 無線體內納米網:十大“可行嗎?”問題

B-杰哥的树(状压树形dp)
腾讯T4架构师,android面试基础

持续测试(CT)实战经验分享

Speech recognition (ASR) paper selection: talcs: an open source Mandarin English code switching corps and a speech

某东短信登录复活 安装部署教程
随机推荐
Leetcode question 283 Move zero
mod_wsgi + pymssql通路SQL Server座
Tencent cloud database public cloud market ranks top 2!
JVM_常见【面试题】
Is it difficult for small and micro enterprises to make accounts? Smart accounting gadget quick to use
[network planning] Chapter 3 data link layer (4) LAN, Ethernet, WLAN, VLAN
句号压缩过滤器
leetcode先刷_Maximum Subarray
recyclerview gridlayout 平分中间空白区域
深度学习分类网络 -- ZFNet
Crawler (14) - scrape redis distributed crawler (1) | detailed explanation
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
01 基础入门-概念名词
B-jiege's tree (pressed tree DP)
5. 無線體內納米網:十大“可行嗎?”問題
数字三角形模型 AcWing 1018. 最低通行费
JMeter server resource indicator monitoring (CPU, memory, etc.)
Detailed introduction of distributed pressure measurement system VIII: basic introduction of akka actor model