Lpic 1 Linux Administrator · Free Practice Question Easy

Question 14

In the vi editor, which command should be used to save the current file with the name filea.txt before exiting?
  • A %s filea.txt
  • B %w filea.txt
  • C :save filea.txt
Reveal correct answer

Correct answer:

A. The command "%s filea.txt" is not the correct command to save the current file with a specific name in vi editor. The "%" symbol is used for different operations in vi editor, and it is not related to saving files.

B. The command "%w filea.txt" is not the correct command to save the current file with a specific name in vi editor. The "%" symbol is used for different purposes in vi editor, and it is not used in the context of saving files.

C. The command ":save filea.txt" is not a valid command in vi editor for saving the current file with a specific name. The correct command for saving files in vi editor is ":w" followed by the file name.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need