Loading practice questions
Match the following vi commands in Unix:
| List-I | List-II |
|---|---|
| (a) :w | (i) Saves the file and quits editing mode |
| (b) :x | (ii) Quits without saving |
| (c) :q | (iii) Saves the file |
| (d) :q! | (iv) Quits the editor |
Correct Answer: A — (a)-(iii), (b)-(i), (c)-(iv), (d)-(ii)
Explanation:
In the vi text editor, :w writes (saves) the file, :x saves and quits, :q quits the editor, and :q! quits without saving.