Saturday, October 8, 2011

The Tilde (~) in Unix & URLs

A tilde (Punctuation mark)Image via Wikipedia
UNIX

In a Unix pathname, the tilde (~) is an abbreviation for the "path to your home directory".

Example (not using ~): 

/home4/susanQ/public_html/110/ is the Unix path to Susan Queue's 110 folder on shell.uoregon.edu.

Example (using ~): 

~/public_html/110/ is the Unix path to Suzie's folder on shell.uoregon.edu

URLs

In a URL, the tilde (~) has a related but different meaning: it stands for the path to your public_html folder on the web server.

Example: 

http://ix.cs.uoregon.edu/~susanQ/ is the URL that corresponds to the Unix path /home4/susanQ/public_html/

Example: 

http://ix.cs.uoregon.edu/~susanQ/110/ is the URL that corresponds to the Unix path /home4/susanQ/public_html/110/
Enhanced by Zemanta

No comments: