LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Does anyone know the origin of using "~" to represent the user's home directory? (https://www.linuxquestions.org/questions/general-10/does-anyone-know-the-origin-of-using-%7E-to-represent-the-users-home-directory-49284/)

GonzoJohn 03-11-2003 10:16 AM

Does anyone know the origin of using "~" to represent the user's home directory?
 
This has been a question I've been wanting to ask. Recently, it came to my attention that I've known that "~" represents the user's home directory in BASH for many years, but I haven't a clue why.

I've done a little google-ing too and couldn't come up with anything either.

Any uber-geeks out there have an answer?

XavierP 03-11-2003 10:32 AM

Bearing in mind that Linux is a Unix variant, it probably comes from Unix.


Couldn't find anything on why that is the way it is though.

unSpawn 03-11-2003 10:56 AM

Me neither, only thing I know is it's a shell-specific thingie to do brace/tilde/dollarsign expansion.

moses 03-11-2003 12:16 PM

This is the best I can do:

http://diveintomark.org/archives/200...the_tilde.html

GonzoJohn 03-11-2003 01:11 PM

Cool moses, thanks for the link. Wish there was a definitive answer, but like Mick Jagger said, you can't always get what you want.

williamwbishop 03-13-2003 05:44 AM

but if you try some times, you just might find, that you get what you need.

Walt_R 10-14-2003 03:42 PM

The tilde is meaningless in the bourne shell on an IBM EXL server.


All times are GMT -5. The time now is 09:06 AM.