Linux uses vi command to edit files to exit without saving

王林
Release: 2020-01-14 09:49:10
Original
11239 people have browsed it

Linux uses vi command to edit files to exit without saving

1. Open the terminal and execute the vi command to open a file, for example:

vi test.txt
Copy after login

2. Then press a or i to enter the editing mode and edit the text content

(Free learning video tutorial recommendation:linux video tutorial)

3. Finally, press the esc key to exit the editing mode, enter: q!, for example:

:q! #退出不保存
Copy after login

Recommended related articles and tutorials:linux tutorial

The above is the detailed content of Linux uses vi command to edit files to exit without saving. 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
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!