| Lesson 2 || More options for listing files |
| Objective || List files using the |
More Options for listing Files using Unix
You already should be familiar with two of the
commands more useful options:
-l, which displays the listing in long format
-F, which flags directory names with a trailing slash (
This lesson will introduce three more
Listing hidden files
Listing a directory tree
Directories often contain other directories, which in turn can contain their own subdirectories, and so on down the file hierarchy.
UNIX lets you display a directory tree all at once by using the
option produces a recursive listing 
. That is,
descends each subdirectory, listing the contents until the bottom of the hierarchy is reached.
Listing a directory name
Normally, when you specify a directory name with
ls, you see the contents of the directory.
But if you want to display the directory itself, use the
-d option. The following Slide Show shows how to use the
-a, -R, and
Advanced Options Listing Files
In the next lesson, copying directories by using the
option of the
command will be discussed.
A recursive listing of a directory is one that repeatedly displays all subdirectories down the hierarchy, until the last level of the directory tree is reached.