当前位置:网站首页>Rhcsa third day operation
Rhcsa third day operation
2022-07-03 20:30:00 【Hao Yikai】
1、 Sum up vim Of the three modes, the commands you think are practical
2、 File management command exercise :
stay /opt Create a temporary directory under the directory tmp;
Create a file in the temporary directory , The file named a.txt;
take a.txt Copy it into b.txt; take b.txt Change its name to c.txt;
Create symbolic links , The linked file name is linkc.txt;
1. First create in the home directory opt as well as tmp Catalog
command ---mkdir
Command format :mkdir -p /opt/tmp
-p—— You can quickly create each directory specified in the directory structure , Existing directories will not be overwritten
2. stay tmp Created in a.txt file
command --cd Toggle directory
command --touch Create an empty file or update the modification date of an existing file or directory
Format : touch a.txt
If the specified file or directory already exists , Change the date and time of the file or directory to the date and time of the current system .
If the specified file does not exist , Creates an empty file with the specified file name
3. take a.txt Copy into b.txt
command --cp Copy (copy) File or directory
command : cp [ Options ] Source file Target file
3、vi practice : Complete the following steps
1) application vi Command in /tmp Create files under folders , file name newfile. stay newfile Enter the date and time on the first line
2) take /boot/grub2/grub.cfg The contents of the document are read into newfile In the document ( On the next line of the date, i.e 2 That's ok )
3) Find documents that contain # The line of the sign character , Delete entire line
Enter in command line mode "/g/ The goal is /d", All targets in the document can be deleted
4) Turn on VI Line number prompt function
Input in command line mode "set nu" Line number can be displayed
5) Move the cursor to 5 That's ok , And in the first place 5 A new blank line is generated after the line 6 That's ok
Enter a number in command line mode and press enter to jump to the specified number of lines , And then in vi Press in mode "o" You can insert a new line under the cursor
6) Modify the content . Will all timeout=5, Change to time=30
Input in command line mode "/" You can find the input after the slash , For modification, add "%s", Pictured (%s Delete ten by default )
7) All... In the entire document root The character is changed to admin character
Add at the back "/g" It means to process all the contents in the document
8) Copy No 1 The date and time content of the line to the end of the document
First in vi Jump to the first line in mode "gg", Copy "yy" Then jump to the last line "G" Then paste "p
9) Save the document , Save the document again as /boot/newfile2, sign out VI Editor
In command mode "w" For preservation ,"w /( The target path )" Save as ,"q" To quit
4、 The file to view
Copy user profile to /opt Under the table of contents ;
see /opt/mima File first 6 That's ok ;
5. Statistics show user profiles nologin Number of occurrences
6. Displays the total number of users in the system
cat /etc/passwd
7. Set the system time ( Minutes and seconds ) write in time file
8.history The system command history can be displayed , Count the top three with the highest command frequency of the current system .( The command repeats three more commands )
[[email protected]_server workspace]# last |awk -F " " '{ print $3 }' |sort -n |uniq -c |sort -nr |head -3
边栏推荐
- About unregistered transfer login page
- Basic command of IP address configuration ---ip V4
- 2022 melting welding and thermal cutting examination materials and free melting welding and thermal cutting examination questions
- Cesiumjs 2022 ^ source code interpretation [7] - Analysis of the request and loading process of 3dfiles
- Change deepin to Alibaba image source
- Line segment tree blue book explanation + classic example acwing 1275 Maximum number
- jvm jni 及 pvm pybind11 大批量数据传输及优化
- Gee calculated area
- Print linked list from end to end
- Micro service knowledge sorting - three pieces of micro Service Technology
猜你喜欢
强基计划 数学相关书籍 推荐
Shortest path problem of graph theory (acwing template)
It is discussed that the success of Vit lies not in attention. Shiftvit uses the precision of swing transformer to outperform the speed of RESNET
Basic knowledge of dictionaries and collections
强化學習-學習筆記1 | 基礎概念
Reinforcement learning - learning notes 1 | basic concepts
Qtablewidget control of QT
String and+
Promethus
The 29th day of force deduction (DP topic)
随机推荐
Global and Chinese market of micro positioning technology 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of liquid antifreeze 2022-2028: Research Report on technology, participants, trends, market size and share
Test changes in Devops mode -- learning and thinking
2022 melting welding and thermal cutting examination materials and free melting welding and thermal cutting examination questions
TLS environment construction and plaintext analysis
Upgrade PIP and install Libraries
How to do Taobao full screen rotation code? Taobao rotation tmall full screen rotation code
The global industrial design revenue in 2021 was about $44360 million, and it is expected to reach $62720 million in 2028. From 2022 to 2028, the CAGR was 5.5%
9 pyqt5 qscrollarea scroll area and qscrollbar scroll bar
Operate BOM objects (key)
Get log4net log file in C - get log4net log file in C
Apprentissage intensif - notes d'apprentissage 1 | concepts de base
MDM mass data synchronization test verification
Assign the CMD command execution result to a variable
Global and Chinese market of speed limiter 2022-2028: Research Report on technology, participants, trends, market size and share
Reinforcement learning - learning notes 1 | basic concepts
Offset related concepts + drag modal box case
Global and Chinese market of rubidium standard 2022-2028: Research Report on technology, participants, trends, market size and share
Cannot load driver class: com. mysql. cj. jdbc. Driver
thrift go