Learn how absolute and relative paths compare and when to use each one. https://red.ht/3QYSiUn
If a pathname begins with a forward slash, it's an ABSOLUTE pathname. If it doesn't begin with a forward slash, guess what, it's a RELATIVE pathname.
Examples:
/tmp/one/two/three -> ABSOLUTE pathname
one -> RELATIVE pathname
../one -> RELATIVE pathname
../../one -> RELATIVE pathname
In the case of my RELATIVE pathname examples, you see that I'm showing multiple examples, which by the way all make reference to the same destination - the directory named "one". The takeaway is, there can be several/many relative pathnames that refer to the same destination (filename or directory). However, there will be, can be, ONLY ONE absolute pathname to any destination (filename or directory).
This wasn't the orginal question, but how do you identify a relative vs an absolute pathname? If the first character in the pathname is a forward slash, the pathname is an ABSOLUTE pathname!!!! End of discussion
Hope this helps (is that what HTH means)
This is a wonderfully easy to follow explaination of the concept! Thanks @Trevor
Also, let me know if you might be interested in doing technical blogging, I think based on the above answer, that you would be great at writing 'to the point' technical content. You can find more information about our publication here: www.redhat.com/sysadmin
Hello TCarrigan,
I'm humbled by your comment, along with your confidence that I might be great at writing, as you put it, "to the point" technical content. I would certainly welcome that opportunity, and will absolutely investigate the possibility. I love explaining things, and I know that the more I engage, the more I maintain and/or advance my own knowledge.
It's always been a win-win proposition for me!
Many thanks for making me aware of another avenue that will afford me the privilege
of being a contributor to the community.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.