exam questions

Exam LFCS All Questions

View all questions & answers for the LFCS exam

Exam LFCS topic 1 question 73 discussion

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

In the vi editor, which of the following commands will copy the current line into the vi buffer?

  • A. c
  • B. cc
  • C. 1c
  • D. yy
  • E. 1y
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
Strib
6 months, 4 weeks ago
Selected Answer: D
The correct option is: D. yy In the vi editor, the command `yy` is used to copy the current line into the vi buffer. Here's an explanation of each option: A. `c`: This command is used to change (delete and enter insert mode) the current line, not to copy it. B. `cc`: This command is used to delete the current line and enter insert mode, not to copy it. C. `1c`: This command is used to change (delete and enter insert mode) the specified line number, in this case, line 1, not to copy the current line. D. `yy`: This command yanks (copies) the current line into the vi buffer. The line can then be pasted (put) using the `p` command. E. `1y`: This command yanks (copies) the specified line number, in this case, line 1, into the vi buffer, not the current line. Therefore, option D, `yy`, is the correct command to copy the current line into the vi buffer.
upvoted 1 times
...
Ivandrago
2 years ago
yank the content in vi
upvoted 1 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