This is merely just a vocabulary question, but which keeps turning around in my head.
It comes from a practice exam from a LPIC preparation book. The correct answer according to the book is that
~/Documents is a relative directory because it is relative to the home directory.
However, this book contains an honourable ratio of typos and mistakes so I cannot take for granted everything which is written there. Here I do not agree because for me
~ acts as a variable expanded by the shell into either the content of the
$HOME variable or the current user home directory path (cf.
man bash), so the actual path is
/home/myuser/Documents which is indeed an absolute directory.
Even Wikipedia, for once, seems of no help to me on this topic (even if it seems to confirm that the book is wrong on this one):
An absolute or full path points to the same location in a file system regardless of the current working directory. To do that, it must contain the root directory.
By contrast, a relative path starts from some given working directory, avoiding the need to provide the full absolute path.
Here again, I do not agree: according to this definition, the path
/opt/kde3/bin/../lib which does not depends of the current working directory should be an absolute one, however my current understanding of this matches the book's author making this path a relative one.
A quick web-search is just adding to my frustration, according to Webster Dictionary:
absolute path - A path relative to the root directory. Its first character must be the pathname separator.
$HOME/Documents, or even just
$HOME would not be considered absolute directories? Or does this definition implies variable expansion? What about the shell's
~ character? Is there any reliable definition of relative vs. absolute directory I can find somewhere and am I wrong all of the way?