LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 10: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, 10:32 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
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, 10:56 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Me neither, only thing I know is it's a shell-specific thingie to do brace/tilde/dollarsign expansion.
 
Old 03-11-2003, 12: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: 50
This is the best I can do:

http://diveintomark.org/archives/200...the_tilde.html
 
Old 03-11-2003, 01: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, 05: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, 03: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



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 12:58 PM
Is "~/" assumed to be a user's home directory ColKurtz Linux - Newbie 3 01-25-2005 09:49 PM
permissions of my /home/"user" directory error darkleaf Linux - Software 10 09-26-2004 02:08 AM
"No write access to $HOME directory" Arthaus Linux - Newbie 2 01-12-2004 07:22 PM
RH9 NIS login error: "home directory does not exist" airrr Linux - Networking 2 08-06-2003 01:47 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 12:43 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration