Which command is used to save and exit from file?

Which command is used to save and exit from file?
Answer
There are several ways to save your document and exit Vi.
…
bold.

:w

save changes (i.e., write) to your file

:q!

quit without saving changes

:wq or ZZ

save changes to file and then qui

:! cmd

execute a single command (cmd) and return to vi

:sh

start up a new UNIX shell – to return to Vi from the shell, type exit or
Ctrl-d
 

Tìm kiếm

Back
Top