Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
pwd without symlinks

Imagine I have a directory


and a symbolic link to it called


now if I enter dirlink and use pwd, it of course prints the 2nd one. Is there a flag to make it resolve the symlink and print the 1st one?

share|improve this question

marked as duplicate by Mat, Michael Mrozek Dec 2 '12 at 18:29

This question was marked as an exact duplicate of an existing question.

Either try /bin/pwd or try pwd -P

share|improve this answer
oops, read Mat's comment above too late... sorry. – pat Dec 2 '12 at 15:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.