You have already used the ls command to list files. The ls command has many options. Use the -l option to display a long format list. Files and directories are listed in alphabetical order. Figure 3-2 illustrates this method for displaying files:
The next nine characters indicate the permissions for the file or directory. The nine characters consist of three groups of three, showing the permissions for the owner, the owner's group, and the world, respectively. The permissions for emptyfile are rw-r--r--, indicating that the owner can read and write this file, everyone can read it, and no one can execute it. The permissions for the directory veggies2 are rwxr-xr-x, indicating that everyone has read and execute permissions, but only the owner can write to it.
In addition to file permissions, the display shows the following information:
Number of links to this file or directory
Name of the owner (user2 in this case)
Date and time the file or directory was last updated
Name of the file or directory
Use the cd command to move to your home directory, and try the ls -lcommand. Your results will differ from the example, of course.
Now try typing a command such as the following:
$ ls -l dirname
where dirname is the name of an actual directory within your file system. When you give the name of a directory, the ls -l command prints information on all the files and directories (if any) within that directory.