Multiple choice

Which of the following commands will print a sorted list of users on the screen?

  1. ls | more

  2. who | sort

  3. who | sort > list.txt

  4. who | wc -l

  5. who | grep STEVE

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

In this command, the output of the 'who' command is passed to the 'sort' command, therefore it will print sorted list of users.