Saving Changes And Quitting Vi
Có thể bạn quan tâm
- Previous: Two Modes of vi
- Next: Printing a File
Saving Changes and Quitting vi
vi is rich in substantively synonymous commands that control the save of the buffer contents to a file and the exit from vi. These commands give you the option of saving, saving-and-quitting, or quitting-without-saving.
Saving
Save the contents of the buffer (write the buffer to the file on disk) by typing:
:w |
Press Return.
Saving and Quitting
Save and quit by typing:
:wq |
Press Return. Alternatively, type ZZ.
Note that the command ZZ is neither preceded by a colon nor followed by Return.
Quitting Without Saving
When you've made no changes to a file and want to quit, type:
:q |
Press Return. If you have made changes, vi does not let you quit with :q. Instead, it displays the following message.
No write since last change (:quit! overrides) |
If you do not want to save your changes, type:
:q! |
Press Return.
- Previous: Two Modes of vi
- Next: Printing a File
- © 2010, Oracle Corporation and/or its affiliates
Từ khóa » Vi In Linux Save
-
An Introduction To The Vi Editor | Enable Sysadmin - Red Hat
-
How To: Vi / Vim Save And Quit The Editor Command - NixCraft
-
How To Save A File In Vi / Vim Text Editor - NixCraft
-
How To Save A File In Vi / Vim Editor & Quit - PhoenixNAP
-
How To Save A File In Vim / Vi And Quit The Editor - Linuxize
-
Using Vi? Here's How To Open A File Then Save And Quit - MakeUseOf
-
How To Save A File In Vi / Vim Editor In Linux - Tecmint
-
How To Save & Quit In VIM Or VI | OSXDaily
-
Saving Files And Quitting Vi
-
How To Save A File In Vim/Vi? - LinuxTect
-
VI Editor With Commands In Linux/Unix Tutorial - Guru99
-
How To Save A File In Vi / Vim And Quit Editor - TecAdmin
-
How To Exit (quit) Linux Vi Editor With Or Without Saving Changes Step ...
-
How To Save A File In Linux After Using The Vi Command