184 views

Match the following $\text{ⅵ}$ commands in Unix :

$\begin{array}{clcl} & \textbf{List-I} & & \textbf{List-II} \\ \text{a.} & \text{:w} & \text{i.} & \text{saves the file and quits editing mode} \\ \text{b.} & \text{:x} & \text{ii.} & \text{escapes unix shell} \\ \text{c.} & \text{:q} &\text{iii.} & \text{saves file and remains in editing mode}\\ \text{d.} & \text{:sh} & \text{iv.} & \text{quits editing mode and no change are}\\&&& \text{saved to the file} \\ \end{array}$

$\textbf{Codes :}$

1. $\text{a-ii, b-iii, c-i, d-iv}$
2. $\text{a-iv, b-iii, c-ii, d-i}$
3. $\text{a-iii, b-iv, c-i, d-ii}$
4. $\text{a-iii, b-i, c-iv, d-ii}$

ans should be D

Quitting and Saving a File

:x quit vi, writing out modified file to file named in original invocation
:w to save your file but not quit vi (this is good to do periodically in case of machine crash!).
:q to quit if you    haven't made any edits.
:sh  escapes  unix shell

Ans is D.