
222 You Are Here
Figure 16.3: Relative pathnames are ‘relative’ to your current position
cd .
What happened? Not much. That’s because using a single dot (.) is the same as specifying your
current working directory.
The differences between absolute and relative paths can sometimes be pretty striking.
Getting back to our shopping mall analogy, if you were to give directions by using an absolute path,
you might say something like:
“Get your car keys. Get in the car. Start the car. Pull out of the driveway. Drive to the corner. . . ”
...Andsoon,untilyou’re finally standing inside your favorite shoe store in the shopping mall.
When you’re using a relative path, you’re saying something like:
“The store’s a couple miles from here, in the shopping mall.”
That’s quite an exaggeration, but you get the idea: As long as you know where you want to go in
relation to where you are, you can use relative paths.
Tip: A path is absolute if the first character is a /;otherwise,it’s a relative path.
You’re now in the home directory, the parent of your login directory. Type:
Comentários a estes Manuais