ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 188 - XK0-005 discussion

Report
Export

An engineer needs to insert a character at the end of the current line in the vi text editor. Which of the following will allow the engineer to complete this task?

A.
p
Answers
A.
p
B.
r
Answers
B.
r
C.
bb
Answers
C.
bb
D.
A
Answers
D.
A
E.
i
Answers
E.
i
Suggested answer: D

Explanation:

The vi text editor is a popular and powerful tool for editing text files on Linux systems. The vi editor has two modes: command mode and insert mode. In command mode, the user can issue commands to manipulate the text, such as moving the cursor, deleting, copying, pasting, searching, replacing, and saving. In insert mode, the user can type text into the file. To switch from command mode to insert mode, the user can press various keys, such as i, a, o, I, A, or O. To switch from insert mode to command mode, the user can press the Esc key.

To insert a character at the end of the current line in the vi editor, the user can press the A key in command mode. This will move the cursor to the end of the line and switch to insert mode. Then, the user can type the desired character and press Esc to return to command mode. The statement D is correct.

The statements A, B, C, and E are incorrect because they do not perform the desired task. The p key in command mode will paste the previously copied or deleted text after the cursor. The r key in command mode will replace the character under the cursor with another character. The bb key in command mode will move the cursor back two words. The i key in command mode will switch to insert mode before the cursor.Reference: [How to Use vi Text Editor in Linux]

asked 02/10/2024
Balazs Jarmy
48 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first