There are many ways:
Exit Vi When editing the file, ready to exit Vi and return to the shell, you can use one of the following methods. In the command mode, double-click the uppercase letter Z. If the currently edited file has been modified, Vi saves the file and exits, returning to the shell; if the currently edited file has not been modified, Vi exits directly. Return to the shell. In the last line mode, enter the command :w Vi to save the current edit file, but not exit, but continue to wait for the user to enter the command. When using the w command, you can give the edit file a new file name. [Example 6] :w newfile At this point, Vi will save the contents of the current file to the specified newfile, while the original file remains unchanged. If newfile is an existing file, Vi gives a prompt message in the status line of the display window: File exists (use ! to override) At this point, if the user really wants to replace the original content in the newfile with the current content of the file, Use the command :w! newfile otherwise you can choose another file name to save the current file. In the last line mode, enter the command :q The system exits Vi and returns to the shell. If the edit file is not saved when you exit Vi with this command, Vi displays the following information at the last line of the display window: No write since last change (use ! to overrides) prompts the user that the file has not been saved after being modified, and then Vi does not quit and continues to wait for user commands. If the user wants to save the modified file and wants to quit Vi, you can use the command :q! Vi to abandon the changes and return directly to the shell. In the last line mode, enter the command :wq Vi to save the file first, then exit Vi and return to the shell. In the last line mode, enter the command :x The function of this command is the same as the ZZ command function in command mode.
DevOps is the key to more and more large companies and organizations, so it is important for us to r
Before downloading the files on the Linux machine via FTP, upload it after the Windows editing, so
There are WINDOWS on the computer and LINUX Some people like GRUB, and some people like NT Loader to
Currently, a very serious Bash vulnerability has been exposed on the Internet. It
Introduction to the concept of TLB under Linux
Talk about how to learn Linux system
In what case in c# (int), when to use Convert.ToInt32
Cron plan task configuration method in linux (centos)
View/Modify Linux Time Zone and Time
Do a good job in Linux log management
Introduction to Linux File System Directory Structure
How to set the partition where grub is located
Use the awk command to find hidden superusers and passwords in the system.
WinXP does not have permission to view the processing method of the workgroup computer
How to block ads in Baidu browser mobile version?
How does Win10 show disk cleaning function?
Solution for playing video file jaggedness under Win7
How to set parental control function in win8
Installing and Uninstalling Win10 System with Virtual Disks
CF guesses big combat activities. The more rewards you guess, the more rewards