DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Working with files and directories

Finding out where you are in the system

After a number of cd operations, it is possible to lose track of where you are in the filesystem. To identify your current directory, use the pwd(C) (print working directory) command. This command takes no arguments.

The output from pwd shows the absolute pathname of your current directory. For example, if your login is johnd and you are in your home directory (which is a subdirectory of /usr), the output would probably look like the following:

   $ pwd
   /usr/johnd

If you are using the Korn shell (see ``Identifying your login shell'' if you are unsure about this), you will find it useful to issue the following command as soon as you log in, or add it to your login script:

   alias pwd='pwd -P'
The reason for this is explained in ``Navigating symbolic links''.
Next topic: Changing directory
Previous topic: Navigating the filesystem

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