Multiple choice technology

How do you list all the files that are in the current directory?

  1. list all

  2. ls -a

  3. ls -full

  4. list -lrt

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

'ls -a' lists all files in the current directory, including hidden files (those starting with .). 'list all' is not a Unix command, 'ls -full' is not valid syntax (though 'ls -l' gives long format), and 'list -lrt' is not a valid command (though 'ls -lrt' sorts by time reverse).