Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of saving files edited by vi by linux

Shulou Source: shulou.com Published: 2022-06-03 08:04:02 12月06日 Update

Today, the editor to share with you is the linux to save vi edited files, many people do not understand, today, in order to let you know more about linux saved vi edited files, so give you a summary of the following content, let's look down. I'm sure you'll get something.

After editing in vi, first press ESC to return to command mode, and then type: W to save, or you can enter: wq! Save the file and exit.

The following is the save command:

W Save the file without exiting vi

W file saves the changes to file and does not exit vi

: w! Force save without exiting vi

Wq saves the file and exits vi

: wq! Force to save the file and exit vi

: Q quit vi without saving the file

: q! Do not save the file, force to exit vi

: e! Discard all changes

The above is a brief introduction to the method of saving vi edited files by linux. Of course, the differences in the detailed use of the above have to be understood by everyone. If you want to know more, welcome to follow the industry information channel!

Tags: File force method command input different abbreviated content that is more mode look industry information information channel face channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Xiaomi Shulou Information macOS MariaDB