Home > Operation and Maintenance > Linux Operation and Maintenance > How to save files edited by vi in ​​linux

How to save files edited by vi in ​​linux

Release: 2020-03-27 16:45:26
Original
5295 people have browsed it

How to save files edited by vi in ​​linux

After editing in vi, first press the ESC key to return to the command mode, then enter: w to save, or enter: wq! to save the file and exit.

The following is the save command:

:w Save the file without exiting vi

:w file Save the modifications to file without exiting vi

:w! Force save without exiting vi

:wq Save the file and exit vi

:wq! Force save the file without exiting vi

:q Do not save the file , exit vi

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

:e! Abandon all modifications

Recommended learning: Linux video tutorial

The above is the detailed content of How to save files edited by vi in ​​linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template