Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm sitting in front of a Linux shell. I want to do something like pwd, except I want an absolute answer, i.e. I want any symlinks to be resolved to their true path. How can I do that?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

You should be able to use pwd -P

tony@matrix:/var/vhosts$ pwd
/var/vhosts
tony@matrix:/var/vhosts$ pwd -P
/srv/data/vhosts
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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