Multiple choice unix

Which command is used to sort the lines of data in a file in reverse order

  1. sort

  2. sh

  3. st

  4. sort -r

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The sort command arranges lines textually. The -r flag specifically instructs the utility to perform the sort in reverse (descending) order. The other options are either the default ascending sort or non-existent commands like 'st' or the shell command 'sh'.