当前位置:网站首页>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
边栏推荐
- Class loading process
- JMeter plug-in installation
- 2022 melting welding and thermal cutting examination materials and free melting welding and thermal cutting examination questions
- Global and Chinese markets of polyimide tubes for electronics 2022-2028: Research Report on technology, participants, trends, market size and share
- 2.6 formula calculation
- Basic knowledge of dictionaries and collections
- 47. Process lock & process pool & Collaboration
- Battle drag method 1: moderately optimistic, build self-confidence (1)
- Q&A:Transformer, Bert, ELMO, GPT, VIT
- thrift go
猜你喜欢

TLS environment construction and plaintext analysis

44. Concurrent programming theory

2.5 conversion of different data types (2)

MDM mass data synchronization test verification
![AI enhanced safety monitoring project [with detailed code]](/img/a9/cb93f349229e86cbb05ad196ae9553.jpg)
AI enhanced safety monitoring project [with detailed code]

How can the outside world get values when using nodejs to link MySQL
![[effective Objective-C] - block and grand central distribution](/img/09/22b979b97ea13d649b4b904637b79f.jpg)
[effective Objective-C] - block and grand central distribution

An old programmer gave it to college students

Detailed and not wordy. Share the win10 tutorial of computer reinstallation system

The 29th day of force deduction (DP topic)
随机推荐
JVM JNI and PVM pybind11 mass data transmission and optimization
Global and Chinese market of charity software 2022-2028: Research Report on technology, participants, trends, market size and share
Battle drag method 1: moderately optimistic, build self-confidence (1)
【c】 Digital bomb
Gym welcomes the first complete environmental document, which makes it easier to get started with intensive learning!
JMeter plug-in installation
thrift go
Task of gradle learning
Strange way of expressing integers (expanding Chinese remainder theorem)
Implementation of stack
Popularize the basics of IP routing
Oak-d raspberry pie cloud project [with detailed code]
Blue Bridge Cup: the fourth preliminary - "simulated intelligent irrigation system"
Cannot load driver class: com. mysql. cj. jdbc. Driver
Explore the internal mechanism of modern browsers (I) (original translation)
Based on laravel 5.5\5.6\5 X solution to the failure of installing laravel ide helper
Change deepin to Alibaba image source
Recommendation of books related to strong foundation program mathematics
Producer consumer mode (multithreading, use of shared resources)
[Tang Laoshi] C -- encapsulation: member variables and access modifiers