Home  >  Article  >  Operation and Maintenance  >  How to save and exit after modifying a file under centos

How to save and exit after modifying a file under centos

王林
王林Original
2020-05-23 13:23:335812browse

How to save and exit after modifying a file under centos

The command to save the file is as follows:

Press the ESC key to jump to the command mode, then:

:w Save the file without exiting vi

:w file Save the modifications to file separately without exiting vi

:w! Force save without exiting vi

:wq Save the file and exit vi

:wq! Force save the file and exit vi

:q Do not save the file and exit vi

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

:e! Discard all changes and start editing from the last time you saved the file

Recommended tutorial:centos tutorial

The above is the detailed content of How to save and exit after modifying a file under centos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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