当前位置:网站首页>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
边栏推荐
- Print linked list from end to end
- From the behind the scenes arena of the ice and snow event, see how digital builders can ensure large-scale events
- 4. Data splitting of Flink real-time project
- 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%
- Get log4net log file in C - get log4net log file in C
- 11-grom-v2-04-advanced query
- Line segment tree blue book explanation + classic example acwing 1275 Maximum number
- Implementation of stack
- Do you really know how old you are?
- Qt6 QML Book/Qt Quick 3D/基础知识
猜你喜欢

Use nodejs+express+mongodb to complete the data persistence project (with modified source code)

Line segment tree blue book explanation + classic example acwing 1275 Maximum number

Teach you how to quickly recover data by deleting recycle bin files by mistake

1.5 learn to find mistakes first

MDM mass data synchronization test verification

1.4 learn more about functions

2.7 format output of values

Basic knowledge of dictionaries and collections
![Oak-d raspberry pie cloud project [with detailed code]](/img/34/76b461bf03fba373da5b5898c5204c.jpg)
Oak-d raspberry pie cloud project [with detailed code]

Do you really know how old you are?
随机推荐
Initialization and instantiation
Refer to some books for the distinction between blocking, non blocking and synchronous asynchronous
Gauss elimination solves linear equations (floating-point Gauss elimination template)
Use nodejs+express+mongodb to complete the data persistence project (with modified source code)
Micro service knowledge sorting - three pieces of micro Service Technology
11-grom-v2-04-advanced query
Machine learning support vector machine SVM
Shortest path problem of graph theory (acwing template)
Oak-d raspberry pie cloud project [with detailed code]
String and+
2022 low voltage electrician examination and low voltage electrician simulation examination question bank
强化學習-學習筆記1 | 基礎概念
1.4 learn more about functions
Test changes in Devops mode -- learning and thinking
Discussion Net legacy application transformation
Wireless network (preprocessing + concurrent search)
Microservice knowledge sorting - search technology and automatic deployment technology
Offset related concepts + drag modal box case
Recommendation of books related to strong foundation program mathematics
[effective Objective-C] - block and grand central distribution