PrepAway - Latest Free Exam Questions & Answers

Which of the following commands should Mark use to accomplish this task?

Mark is a newly appointed Network Technician for McNeil Inc. The company has a Linux-based
network. He is working on the Red Hat operating system. He wants to sort a file named
marketing.txt in the reverse alphabetical order. Which of the following commands should Mark use
to accomplish this task?

PrepAway - Latest Free Exam Questions & Answers

A.
sort -u marketing.txt

B.
sort marketing.txt

C.
sort -n marketing.txt

D.
sort -r marketing.txt

Explanation:

This command will run sort on the file marketing.txt and sort the file in the reverse alphabetical
order.
Answer option B is incorrect. sort with no options is used to sort file alphabetically. It will not sort
the file in the reverse alphabetical order.
Answer option C is incorrect. The -n option used with the sort command sorts the text numerically,
instead of by characters.
Answer option A is incorrect. The -u option with sort removes duplicate lines from the output.


Leave a Reply