ls — list

3) lslist

List out the contents of a directory. If you don’t specify anything else, ls will list the contents of the current directory. That’s the same thing as

ls .

(Remember, because . means current working directory.)

If you tell ls to list a different directory, like a subdirectory

ls coverage/

will list out the contents of a directory called coverage/ inside of the current one. If there is no such directory, it will tell you like so:

ls: coverage/: No such file or directory

An honorable mention goes to ls -la, which is both the -l flag for long format and also the -a flag to show file that begins with a dot. Note -a happens to show invisible files, the working directory (.) and the parent directory too (..). Try it out anywhere and notice that you will see the files listed vertically one on each one. Also, you’ll see the permissions, owner, and group settings. (Sorry, that’s for another Unix day!)