当前位置:网站首页>Rhcsa day 3
Rhcsa day 3
2022-07-04 02:55:00 【Dd_ five hundred and seventy-seven】
1、 Sum up vim Of the three modes, the commands you think are practical
1、Vi/vim (-o) file 1 file 2( Open two files )ctrl+w+w Switch
Command mode :
d Delete ,dd Deletes the line where the cursor is located x Delete cursor u withdraw
G Jump to the end ( Numbers G Jump to line number ) ^ Head of line $ At the end of the line
( Numbers )yy Copy line ( Numbers )cc shear p Paste
Last row mode :
Wq!( preservation 、 sign out 、 mandatory ) nu\nonu( Digital marker line exit )
r( Open the specified file to the next line ) noh( set nohlsearch )
%s /// Change the specified text
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;
[[email protected] ~]# mkdir /opt/tmp
[[email protected] ~]# cd /opt/tmp
[[email protected] tmp]# touch a.txt
[[email protected] tmp]# cp -p a.txt b.txt
[[email protected] tmp]# mv b.txt c.txt
[[email protected] tmp]# ln -s c.txt linkc.txt
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
4) Turn on VI Line number prompt function
:set nu // Turn on the line number prompt
:set nonu // Turn off line number prompt
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
Can be in command mode yy( Copy ) A blank line again p( Paste )
Or in input mode Enter key
6) Modify the content . Will all timeout=5, Change to time=30
:%s/timeout=5/time=30
7) All... In the entire document root The character is changed to admin character
:%s/root/admin
8) Copy No 1 The date and time content of the line to the end of the document
Can be in command mode yy( Copy ) The first line again p( Paste )
In command mode gg Move to first line G Move to last line
9) Save the document , Save the document again as /boot/newfile2, sign out VI Editor
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
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 )
边栏推荐
- The difference between MCU serial communication and parallel communication and the understanding of UART
- Global and Chinese markets for electroencephalogram (EEG) devices 2022-2028: Research Report on technology, participants, trends, market size and share
- On Valentine's day, I code a programmer's exclusive Bing Dwen Dwen (including the source code for free)
- Examination question bank of constructor decoration direction post skills (constructor) and examination data of constructor decoration direction post skills (constructor) in 2022
- Fudan released its first review paper on the construction and application of multimodal knowledge atlas, comprehensively describing the existing mmkg technology system and progress
- I stepped on a foundation pit today
- Push technology practice | master these two tuning skills to speed up tidb performance a thousand times!
- Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
- 13. Time conversion function
- Latex tips slash \backslash
猜你喜欢
Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
[Yugong series] February 2022 attack and defense world advanced question misc-84 (MySQL)
How to subcontract uniapp and applet, detailed steps (illustration) # yyds dry goods inventory #
This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
Comment la transformation numérique du crédit d'information de la Chine passe - t - elle du ciel au bout des doigts?
Command Execution Vulnerability - command execution - vulnerability sites - code injection - vulnerability exploitation - joint execution - bypass (spaces, keyword filtering, variable bypass) - two ex
Tsinghua University product: penalty gradient norm improves generalization of deep learning model
[Yugong series] February 2022 attack and defense world advanced question misc-83 (QR easy)
Network communication basic kit -- IPv4 socket structure
随机推荐
false sharing
Learn these super practical Google browser skills, girls casually flirt
Setting methods, usage methods and common usage scenarios of environment variables in postman
String: LV1 eat hot pot
Global and Chinese market of thin film deposition systems 2022-2028: Research Report on technology, participants, trends, market size and share
Sword finger offer 14- I. cut rope
Setting methods, usage methods and common usage scenarios of environment variables in postman
PMP 考試常見工具與技術點總結
Experience summary of the 12th Blue Bridge Cup (written for the first time)
Record a problem that soft deletion fails due to warehouse level error
Global and Chinese market of box seals 2022-2028: Research Report on technology, participants, trends, market size and share
The requests module uses
Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram
Dare to climb here, you're not far from prison, reptile reverse actual combat case
Global and Chinese market for travel wheelchairs 2022-2028: Research Report on technology, participants, trends, market size and share
The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
Node write API
96% of the collected traffic is prevented by bubble mart of cloud hosting
The first spring of the new year | a full set of property management application templates are presented, and Bi construction is "out of the box"
Latex tips slash \backslash