16.3 Looking Around With ls 225
When you’re done being root, just type exit at the prompt.
[root@localhost /root]# exit
exit
[billy@localhost billy]$
Summary: To change directories using absolute pathnames, type cd/directory/directory;
to change directories using relative pathnames, type cd directory to move one direc-
tory below, cd directory/directory to move two directories below, etc.; to jump
from anywhere on the filesystem to your login directory, type cd ˜ ; to change to the
parent of the directory you’re in, type cd .. Use . to refer to your current directory.
16.3 Looking Around With ls
Now that you know how to move around, it’s time to take a look at what’sinthedirectories.
But first, let’smakesureyou’ve got something you can look for in your login directory before we go
any further.
You can start by creating an empty file. To do so, you can use a utility called touch at the shell
prompt. Try it; type:
touch foo.bar
Now, in your login directory, you’ve got an empty file called foo.bar.You’ll see it in a couple
minutes.
Let’s also create a new directory, using the mkdir command.
At the prompt, type:
mkdir tigger
Now, you’ve created a directory called tigger in your login directory. From root, your new direc-
tory’s absolute pathname would be /home/yourlogin/tigger, and your directory is the parent
of tigger. (You can learn more about creating – and removing –files and directories in Chapter 17
on page 255.)
Now, you’re ready to go.
In the DOS world, using the dir command will display the contents of a directory.
Comments to this Manuals