DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Directories and files

Hidden files

Files whose names begin with ``.'' (dot) are hidden from view in a normal directory listing. Certain programs, such as mail and your shell, create hidden files to avoid cluttering your home directory with unnecessary files. You may want to create hidden files yourself, for example, to store personal mail.

To see hidden files, you need to add the -a (all) option to the list command. To see all the files in a directory, you can type ls -a, lc -a, or lf -a.

Try listing all the files in your home directory:

  1. See if you are in your home directory by typing pwd and pressing <Enter>.

  2. If you are not in your home directory, type cd and press <Enter>.

  3. List all the files in your home directory by typing ls -a.

If you are using the Korn shell, you see something like this:
   $ ls -a
   .
   ..
   .kshrc
   .mailrc
   .profile
   .lastlogin
The first two files (``.'' and ``..'') are placeholders that refer to the current directory (the one you are in) and its parent directory (the one above it). (Remember, the shortcut for going to the directory above where you are right now is cd .. ) You see ``.'' and ``..'' in every directory where you list all the files.

The .kshrc and .profile files are files that the Korn shell reads when you first log in. These files control your environment: that is, they control the way you work on a UNIX system. For more information, see ``Customizing your environment''. (Bourne shell users see a file named .profile, and C-shell users see a file named .login and a file named .cshrc; these are the files those shells read at login.) The file .lastlogin keeps track of the last time you logged in.


Next topic: Listing more information about files
Previous topic: Listing the files in a directory

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005