Computer Science - Linux - Discussion

Discussion :: Linux - Section 1 (Q.No.27)


What command is used with vi editor to save file and remain in the editing mode?

[A]. x
[B]. q!
[C]. :w
[D]. :q
[E]. None of the above

Answer: Option C


No answer description available for this question.

Dharam said: (Dec 31, 2011)  
In vi editors we use :wq write and quit to save the content.but if we used only w its means just write but not save, so that why we used :wq not w.

Bhavika said: (Mar 14, 2015)  
'w' is for writing & saving. We are using insert for writing.

Aditya said: (Jun 29, 2016)  
We can also use to save and quit the file :x.

Bruce said: (Apr 27, 2018)  
This :w is just for writing and saving.

@Dharam, if you add ''q'' means you just quit the editor without even saving, that is why :w is always needed, to save and stay in the editor, or to save and quit by just typing '' wq! ".

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.