The
ls
command normally ignores any files whose names begin with
a dot (
.
). This is often very convenient: UNIX has lots of
small configuration files, scratch files, etc., that you really don't
care about and don't want to be bothered about most of the time.
However, there are some times when you care very much about these
files. If you want to see "hidden" files, use the command
ls -a
. For example:
%
cd
%
ls
Don't show hidden files
Mail mail.txt performance powertools
%
ls -a
This time, show me EVERYTHING
. .emacs Mail powertools
.. .login mail.txt
.cshrc .mailrc performance
With the
-a
option, we see four additional files: the C shell
initialization file, the login initialization file, the customization
files for the GNU Emacs editor, and mail. We also see two "special"
entries,
.
and
..
, which represent the current directory and the
parent of the current directory.
All UNIX directories contain
these two entries (
18.2
)
.
If you don't want to be bothered with
.
and
..
, many
UNIX systems also have a
-A
option:
%
ls -A
Show me everything but . and ..
.cshrc .login Mail performance
.emacs .mailrc mail.txt powertools