CompTIA A+ Core 2 (220-1102) — Question 46
The command cat comptia.txt was issued on a Linux terminal. Which of the following results should be expected?
Answer options
- A. The contents of the text comptia.txt will be replaced with a new blank document.
- B. The contents of the text comptia.txt would be displayed.
- C. The contents of the text comptia.txt would be categorized in alphabetical order.
- D. The contents of the text comptia.txt would be copied to another comptia.txt file.
Correct answer: B
Explanation
The correct answer is B because the 'cat' command is specifically used to display the contents of a file in the terminal. Option A is incorrect as 'cat' does not replace the file's contents, Option C is wrong since 'cat' does not sort the contents, and Option D is inaccurate as 'cat' does not copy files but rather displays their content.