ls is one of the most basic Unix commands. It enables you to list the contents of a directory.
The commands in this section assume that the shell prompt is displaying your home directory (~).
Type ls and press
A list of the contents of your home directory appears (Figure 4 ).
ls command.
Type ls followed by the subdirectory name (for example, ls Library) and press
A list of the contents of the subdirectory you typed appears (Figure 5 ).
Type ls -l and press
A list of the contents of your home directory, including permissions, owner, size, and modification date information, appears (Figure 6 ).
I tell you more about permissions later in this chapter.
Type ls -a and press
A list of the contents of your home directory, including invisible items, appears (Figure 7 ).