当前位置:网站首页>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 )
边栏推荐
- Base d'apprentissage de la machine: sélection de fonctionnalités avec lasso
- 14. Process time
- Advanced learning of MySQL -- Application -- storage engine
- ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
- Command Execution Vulnerability - command execution - vulnerability sites - code injection - vulnerability exploitation - joint execution - bypass (spaces, keyword filtering, variable bypass) - two ex
- Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website
- 16. System and process information
- 3D game modeling is in full swing. Are you still confused about the future?
- 1day vulnerability pushback skills practice (3)
- Data collection and summary
猜你喜欢
Johnson–Lindenstrauss Lemma
High level application of SQL statements in MySQL database (I)
Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
No clue about the data analysis report? After reading this introduction of smartbi, you will understand!
Unity knapsack system (code to center and exchange items)
Remember another interview trip to Ali, which ends on three sides
The difference between MCU serial communication and parallel communication and the understanding of UART
Mysql-15 aggregate function
Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
Buuctf QR code
随机推荐
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
The requests module uses
Node solves cross domain problems
Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
false sharing
Li Chuang EDA learning notes IX: layers
Www 2022 | taxoenrich: self supervised taxonomy complemented by Structural Semantics
Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
Global and Chinese market of cell scrapers 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of small batteries 2022-2028: Research Report on technology, participants, trends, market size and share
[Valentine's Day confession code] - Valentine's Day is approaching, and more than 10 romantic love effects are given to the one you love
12. Gettimeofday() and time()
Leetcode 110 balanced binary tree
WordPress collection WordPress hang up collection plug-in
Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram
Latex tips slash \backslash
查詢效率提昇10倍!3種優化方案,幫你解决MySQL深分頁問題
Experience summary of the 12th Blue Bridge Cup (written for the first time)
3D game modeling is in full swing. Are you still confused about the future?