URLs and Pathnames
The locations of files are specified in two ways: as pathnames and as
URLs.
Pathname
A pathname is the location of a file expressed in terms of the
directories that contain it. For example, the pathname
/home/jtreat/html/home.html indicates that the file
home.html is in the directory html, which is in the directory
jtreat in the directory home. Once you know that all this is on the
ccat.sas machine, then anyone with a ccat.sas account can find
the file. But I could have the same file (with the same pathname) on the
mail.sas.upenn.edu machine.
URL
People who use the Web use a different addressing system. The address
they need is a URL (Universal Resource Locator). A URL contains the name
of the machine and is a totally unique address. The URL of the file
mentioned above is:
http://ccat.sas.upenn.edu/~jtreat/home.html
This URL gives us the following information about the file:
- We need to use the Hypertext Transfer Protocol (http) to view it
properly.
- The file is accessible from the host machine dept.english.upenn.edu.
- The file is in the WWW area set aside for jtreat.
- The file's name is "home.html".
(Here's another explanation.)
Notes
When you edit an HTML document, you use its pathname.
When you view an HTML document, you use its URL.
The Web does not reveal the pathname of a file. It does reveal its URL.
Return to home page workshop
Last Modified: March 15, 1995
If you have suggestions for this web, please forward them to
Jay C. Treat.