Saving Changes And Quitting Vi
Maybe your like

- 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
Tag » How To Save In Vi
-
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 Editor & Quit - PhoenixNAP
-
How To Save A File In Vim / Vi And Quit The Editor - Linuxize
-
How To Save & Quit In VIM Or VI - OSXDaily
-
Using Vi? Here's How To Open A File Then Save And Quit - MakeUseOf
-
How To Save And Quit A File In Vim - MakeUseOf
-
Saving Files And Quitting Vi - UnixWare 7 Documentation
-
How To Save A File In Vi / Vim And Quit Editor - TecAdmin
-
How To Save File In Vi Editor? - YouTube
-
How To Save A File In Vim / Vi Without Root Permission With Sudo On ...
-
How To Save A File In Vi / Vim Editor In Linux - Tecmint
-
How To Exit (quit) Linux Vi Editor With Or Without Saving Changes Step ...
-
How To Exit Vim – Vim Save And Quit Command Tutorial