LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Want to get real path rather than virtual path (https://www.linuxquestions.org/questions/linux-general-1/want-to-get-real-path-rather-than-virtual-path-4175432415/)

Phoenix_Swelter 10-16-2012 02:10 AM

Want to get real path rather than virtual path
 
I have a partition that I have mounted, and I access it through a link to my home directory. What I want to do is have a script that is using the virtual path to recognize the real path.

So if I have $HOME/mydirectory/ that is linked to /mnt/mypartition/, how can I get my script running in $HOME/mydirectory to recognize that its actual path is /mnt/mypartition ?

druuna 10-16-2012 02:12 AM

Try using pwd -P to get the physical path.

Phoenix_Swelter 10-17-2012 02:46 AM

Quote:

Originally Posted by druuna (Post 4806803)
Try using pwd -P to get the physical path.

Thank-you, thank-you, thank-you - that is precisely what I needed!

Solved! :)


All times are GMT -5. The time now is 02:26 PM.