Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pwd(1) — SunOS 0.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cd(1)

csh(1)

getwd(3)

PWD(1)  —  User’s Manual — Commands

NAME

pwd − print working directory name

SYNOPSIS

pwd

DESCRIPTION

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 remembers the pathname from the last cd command.  The example below illustrates the differences. 

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

SEE ALSO

cd(1), csh(1), getwd(3)

Sun System Release 0.3  —  26 April 1983

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026