[Chapter 16] 16.11 Showing Hidden Files with ls -A and -a
Author: Jerry Peek, Tim O'Reilly & Mike Loukides
Date: 1998-08-04T21:37:45Z

#

| Chapter 16 Where Did I Put That? |

## 16.11 Showing Hidden Files with ls -A and -a

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

- ML

16.10 findcmd: Find a Command in Your Search Path |  | 16.12 Useful ls Aliases