What is the command to exit vi without saving in centos?

WBOY
Release: 2022-02-09 16:55:37
Original
14980 people have browsed it

In centos, the command to exit without saving after vi editing is ":q!"; "q" in this command means leaving vi, and "!" often has a mandatory meaning in vi. If it has been modified If you don't want to save the file, you can use this command to force the file to leave without saving it.

What is the command to exit vi without saving in centos?

The operating environment of this article: centos 6.4 system, Dell G3 computer.

What is the command to exit vi without saving in centos

To edit, first enter the letter i to enter the vim editing state

After editing, press the ESC key to exit the editing state and then Use the ":q" command not to save the file and exit vim or use the ":q!" command not to save the file and force quit vim.

Extension:

:w Save the file without exiting vi

:w file Save the modifications to file without exiting vi

:w ! Force to save and not exit vi

:wq Save the file and exit vi

:wq! Force save the file and exit vi

What is the command to exit vi without saving in centos?

Recommended tutorial: "centos tutorial"

The above is the detailed content of What is the command to exit vi without saving in centos?. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!