In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
What are the ways to modify files in linux? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
Vi has two modes: one is an editor and the other is a command. We go from the command to the editor as: iMagneol a. Generally use I: because I am most familiar with this. Exit and click the ESC key to enter command mode.
We need to delete the current line and the last line of the file, the command is: 2dd, we usually use the deletion of a single character: X. We generally enter the editing mode to add, modify, and delete.
However, when we delete and modify too much content, we use the command line mode to modify it, which is convenient and fast, and the four commands most commonly used on the command line are xjindjigu.p:
X: delete the current character; dd: delete the current line; u: resume the previous step; p: copy the previously deleted line.
Vi is a commonly used editor under Linux terminal or console. The basic operation mode is: vi / path / file name.
For example, vi / etc/saikik means to display the contents of the / etc/saikik file.
Use the Page Up and Page Down keys on the keyboard to turn the page up and down
Press the insert key, you can see the word "Insert" in the lower left corner of the window, indicating that it is currently in the insert editing state, and the content entered from the keyboard will be inserted into the cursor position.
Press the insert key again, and there will be the word "Replace" in the lower left corner, indicating that it is currently in a replacement editing state, and the content entered from the keyboard will replace the content of the cursor position.
After editing the content, press the ESC key and type ": wq", then enter to save the exit.
If you do not want to save and directly exit, press the Esc key, enter ": Q!", and then enter.
"wq" means Write and Quit, that is, save exit; "Q!" Indicates that the modification is ignored and forced to exit.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.