Linux Essentials (010-160) — Question 65
Which of the following commands puts the lines of the file data.csv into alphabetical order?
Answer options
- A. a..z data.csv
- B. sort data.csv
- C. abc data.csv
- D. wc -s data.csv
- E. grep --sort data.csv
Correct answer: B
Explanation
The command 'sort data.csv' is specifically designed to sort the lines of a file in alphabetical order, making it the correct choice. The other options either do not perform sorting (like 'wc -s' which counts lines) or are invalid commands for this purpose.