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?
Asked
Active
Viewed 167 times
4
![](../../users/profiles/20346.webp)
Ram Rachum
- 5,011
- 6
- 33
- 44
1 Answers
9
You should be able to use pwd -P
tony@matrix:/var/vhosts$ pwd
/var/vhosts
tony@matrix:/var/vhosts$ pwd -P
/srv/data/vhosts
![](../../users/profiles/84542.webp)
EightBitTony
- 9,211
- 1
- 32
- 46