exam questions

Exam LFCS All Questions

View all questions & answers for the LFCS exam

Exam LFCS topic 1 question 47 discussion

Actual exam question from Linux Foundation's LFCS
Question #: 47
Topic #: 1
[All LFCS Questions]

Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line?

  • A. i (lowercase)
  • B. P (uppercase)
  • C. p (lowercase)
  • D. U (uppercase)
  • E. u (lowercase)
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Buruguduystunstugudunstuy
6 months, 1 week ago
Selected Answer: C
Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, the single character command that will insert the deleted content below the current line is 'p' (lowercase). Option C is the correct answer. In vi, the 'p' command is used to paste the deleted or yanked text after the current cursor position. The 'P' command is similar, but it pastes the text before the current cursor position. To insert the deleted content below the current line in vi, you can use the 'p' command. This will paste the deleted text after the current cursor position, inserting it below the current line.
upvoted 2 times
Buruguduystunstugudunstuy
6 months, 1 week ago
The other options do not accurately describe the behavior of the 'p' command: Option A: The 'i' command is used to enter insert mode, but it does not insert the deleted content. Option B: The 'P' command inserts the deleted content before the current cursor position, not below it. Option D: The 'U' command is used to undo the last change, but it does not insert the deleted content. Option E: The 'u' command is used to undo the last change, but it does not insert the deleted content. Note: In vi, the deleted or yanked text is stored in a buffer called the "kill ring." The 'p' and 'P' commands retrieve text from the kill ring and insert it into the document.
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago