16.3 Looking Around With ls 227
Quite a difference. When you added the -a option, you were specifying that you wanted to list all
the files in the directory (see Figure 16.6).
In fact, there are a multitude of options available with the ls command.
Tip: If you want to see all the options of the ls command, you can read the man page
by typing man ls at a shell prompt. If you want to print the man page, type man ls |
col -b | lpr at the prompt.
Why so many options? Because they can help you sort information according to your needs. For
example, you can specify how files are displayed, see their permissions and much more.
Figure 16.6: The ls command with the -a option
When you typed ls -a, you probably noticed the files that begin with dots. These are called hidden
files or, appropriately enough, dot files.
Hidden files are mostly configuration files which set preferences in programs, window managers,
shells and more. The reason they’re “hidden” is to help prevent any accidental tampering by the
user.
Whenever a filename starts with a dot (.), it’s a hidden file, and ls won’t list it.
Viewing all the files can give you plenty of detail, but there’s more you can uncover, simply by adding
more than one option.
Comments to this Manuals