当前位置:网站首页>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
边栏推荐
- TLS environment construction and plaintext analysis
- 4. Data splitting of Flink real-time project
- Producer consumer mode (multithreading, use of shared resources)
- Discussion Net legacy application transformation
- Viewing Chinese science and technology from the Winter Olympics (II): when snowmaking breakthrough is in progress
- Use nodejs+express+mongodb to complete the data persistence project (with modified source code)
- 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
- MDM mass data synchronization test verification
- Microservice framework - frequently asked questions
- Instructions for common methods of regular expressions
猜你喜欢
Exercises of function recursion
Haven't expressed the artifact yet? Valentine's Day is coming. Please send her a special gift~
Basic knowledge of dictionaries and collections
Gee calculated area
浅议.NET遗留应用改造
Battle drag method 1: moderately optimistic, build self-confidence (1)
2.1 use of variables
SQL injection - Fundamentals of SQL database operation
Machine learning support vector machine SVM
Gym welcomes the first complete environmental document, which makes it easier to get started with intensive learning!
随机推荐
In 2021, the global revenue of syphilis rapid detection kits was about US $608.1 million, and it is expected to reach US $712.9 million in 2028
Gym welcomes the first complete environmental document, which makes it easier to get started with intensive learning!
18、 MySQL -- index
2.7 format output of values
Global and Chinese market of two in one notebook computers 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of high purity copper foil 2022-2028: Research Report on technology, participants, trends, market size and share
Upgrade PIP and install Libraries
Microservice knowledge sorting - search technology and automatic deployment technology
In 2021, the global revenue of thick film resistors was about $1537.3 million, and it is expected to reach $2118.7 million in 2028
Basic knowledge of dictionaries and collections
Global and Chinese markets for medical temperature sensors 2022-2028: Research Report on technology, participants, trends, market size and share
Qtablewidget control of QT
Micro service knowledge sorting - asynchronous communication technology
Parental delegation mechanism
Use nodejs+express+mongodb to complete the data persistence project (with modified source code)
Test access criteria
Global and Chinese market of high temperature Silver sintering paste 2022-2028: Research Report on technology, participants, trends, market size and share
Introduction to golang garbage collection
Global and Chinese market of micro positioning technology 2022-2028: Research Report on technology, participants, trends, market size and share
Sparse matrix (triple) creation, transpose, traversal, addition, subtraction, multiplication. C implementation