Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Apropos / Subsearch:
optional field

PWD(1)                      General Commands Manual                     PWD(1)

       pwd - display the pathname of the current working directory


       pwd prints the pathname of the working (current) directory.

       If you are using csh(1), you can use the dirs builtin command to do the
       same job more quickly; but dirs can give a different answer in the rare
       case  that  the  current  directory or a containing directory was moved
       after the shell descended into it.  This is because pwd  searches  back
       up  the directory tree to report the true pathname, whereas dirs remem-
       bers the pathname from the  last  cd(1)  command.   The  example  below
       illustrates the differences.

              example% cd  /usr/wendy/january/reports
              example% pwd
              example% dirs
              example% mv ~/january ~/february
              example% pwd
              example% dirs

       pwd  and  dirs  also  give  different answers when you change directory
       through a symbolic link.  For example:
              example% cd  /usr/wendy/january/reports
              example% pwd
              example% dirs
              example% ls -l /usr/wendy/january
              lrwxrwxrwx  1 wendy          17 Jan 30  1983 /usr/wendy/january ->> /usr/wendy/1984/jan/
              example% cd  /usr/wendy/january
              example% pwd
              example% dirs

       The pathnames of files mounted with the Automounter can also change  if
       the  file  is not used for a certain time interval (the default is five
       minutes).  To prevent this, set the environment variable AUTOMOUNT_FIX-
       NAMES.  See automount(8) for more information.

       cd(1), csh(1), automount(8)

                               9 September 1987                         PWD(1)