What does the ~ mean in a file path?
What does the ~
mean in an absolute file path?
I see this in the output of things like build scripts but the path does not exist.
Solution 1:
Normally it means the user's home directory e.g. ~mike/
would be the user mike
's home directory, ~/
would be your own home directory. However, it is unclear to me whether ~/
and ~mike/
should be considered absolute or relative; it seems to depend on the definition given (if anyone can come up with an authorative reference, please post a comment).
Note that I'm talking about Unix based systems here.
See http://en.wikipedia.org/wiki/Home_directory#Unix
Solution 2:
Actually, both of the answers by Adrian Mouat and studiohack are true.
In operating systems with limited naming convention (Older version of Windows/DOS etc') it signifies a long name.
e.g. "c:\program files\" is equivalent to "c:\progra~1\"
In some operating systems (namely Unix) it means home-dir (and might be seen as an absolute but not canonical path).e.g."/a/vol01/usr/mike/" might be shortened to "~/mike/"
* where 'usr' is the home dir.