LPIC-1 Exam 101 v5 (Linux Administrator) — Question 51
Which of the following vi commands deletes two lines, the current and the following line?
Answer options
- A. d2
- B. 2d
- C. 2dd
- D. dd2
- E. de12
Correct answer: C
Explanation
The correct answer is C, '2dd', which specifically deletes the current line and the next line in vi. Option A, 'd2' and B, '2d' do not correctly specify the action for deleting lines in this context. Option D, 'dd2' and E, 'de12' are also not valid commands for this operation.