LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 03-11-2003, 11:16 AM   #1
GonzoJohn
Member
 
Registered: Jun 2001
Location: Louisville, KY USA
Distribution: RedHat and Debian
Posts: 89

Rep: Reputation: 15
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?
 
Old 03-11-2003, 11:32 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
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.
 
Old 03-11-2003, 11:56 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,543
Blog Entries: 54

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Me neither, only thing I know is it's a shell-specific thingie to do brace/tilde/dollarsign expansion.
 
Old 03-11-2003, 01:16 PM   #4
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
This is the best I can do:

http://diveintomark.org/archives/200...the_tilde.html
 
Old 03-11-2003, 02:11 PM   #5
GonzoJohn
Member
 
Registered: Jun 2001
Location: Louisville, KY USA
Distribution: RedHat and Debian
Posts: 89

Original Poster
Rep: Reputation: 15
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.
 
Old 03-13-2003, 06:44 AM   #6
williamwbishop
Member
 
Registered: Feb 2003
Location: god's judge
Posts: 376

Rep: Reputation: 30
but if you try some times, you just might find, that you get what you need.
 
Old 10-14-2003, 04:42 PM   #7
Walt_R
LQ Newbie
 
Registered: Oct 2003
Posts: 8

Rep: Reputation: 0
The tilde is meaningless in the bourne shell on an IBM EXL server.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cant login. "no directory /home/chris!" qwijibow Linux - Newbie 5 02-26-2009 01:58 PM
Is "~/" assumed to be a user's home directory ColKurtz Linux - Newbie 3 01-25-2005 10:49 PM
permissions of my /home/"user" directory error darkleaf Linux - Software 10 09-26-2004 03:08 AM
"No write access to $HOME directory" Arthaus Linux - Newbie 2 01-12-2004 08:22 PM
RH9 NIS login error: "home directory does not exist" airrr Linux - Networking 2 08-06-2003 02:47 PM


All times are GMT -5. The time now is 05:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration