
16.2 Getting From Here to There: cd 219
16.2 Getting From Here to There: cd
Whenever you want to change directories, all you’ve got to do is type:
cd
Go ahead, try it. In an xterm window, type:
cd
That didn’t do much, did it? That’sbecauseyoudidn’t tell your system where you wanted to go.
Whether you’re going to a store in a mall or to visit relatives across the country, you’ve got to know
how to get from one point to another. That is, you’ll need to know the path to follow.
As with anything in life, the path – or, pathname – is basically the set of directions that takes you
from one point to another. In the case of your Linux system (and in the DOS/Windows world, as
well), you state a path to take you from one directory or file to another.
Let’s try it again. Open an xterm window. Find yourself first with the pwd command. When you
type your commands, your window will look like:
[billy@localhost billy]$ pwd
/home/billy
[billy@localhost billy]$
Now that you see where you are, you can start to give your system the path to follow.
Well, almost. . .
Try typing:
cd home
What happened? You know there’s a directory called home, and you typed in the path. So what does
this “no such file or directory” mean?
It means your path is incomplete.
Try typing:
cd /home
Komentarze do niniejszej Instrukcji