Which command is used to sort the lines of data in a file in reverse order
61 views
- sort
- sh
- st
- sort -r (Correct Answer)
Explanation
Sort command is basically used for "ordering a file".
By default, it orders lines in ASCII collating sequence.
Sort options are:
1. Reverses sort order(-r).
2. Sorting on primary key(-k).
3. Numeric sort(-n).
4. Removing repeated lines(-u).