pwd 930 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. .TH PWD 1
  2. .SH NAME
  3. pwd, pbd \- working directory
  4. .SH SYNOPSIS
  5. .B pwd
  6. .br
  7. .B pbd
  8. .SH DESCRIPTION
  9. .I Pwd
  10. prints the path name of the working (current) directory.
  11. .I Pwd
  12. is guaranteed to return the same path that was used to
  13. enter the directory.
  14. If, however, the name space has changed, or directory names
  15. have been changed, this path name may no longer be valid.
  16. (See
  17. .IR fd2path (2)
  18. for a description of
  19. .BR pwd 's
  20. mechanism.)
  21. .PP
  22. .I Pbd
  23. prints the base name of the working (current) directory.
  24. It prints no final newline and is intended for applications
  25. such as constructing shell prompts.
  26. Since it uses
  27. .IR stat (2)
  28. to discover the name of
  29. .B \&.
  30. (dot),
  31. if the directory has been bound to another name, it will show
  32. the underlying name rather than that reported by
  33. .IR pwd .
  34. .SH SOURCE
  35. .B /sys/src/cmd/pwd.c
  36. .br
  37. .B /sys/src/cmd/pbd.c
  38. .SH SEE ALSO
  39. .I cd
  40. in
  41. .IR rc (1),
  42. .IR bind (1),
  43. .IR intro (2),
  44. .IR getwd (2),
  45. .IR fd2path (2)