
1b
In your home directory, enter
mkdir /tmp/test
.
mkdir
stands for
“make directory”. This command creates a new directory named
test
in
the
/tmp
directory. In this case, use an absolute path to create the directory.
1c
To check what happened, now enter
ls -l /tmp
. The new directory
test
should appear in the list of contents of the
/tmp
directory.
2
Now create a new file in your home directory and copy it to the
/tmp/test
directory by using a relative path.
2a
Enter
touch myfile.txt
. The
touch
command with the
myfile.txt
option creates a new, empty file named
myfile.txt
in your current direc-
tory.
2b
Check this by entering
ls -l
. The new file should appear in the list of
contents.
2c
Enter
cp myfile.txt ../tmp/test
. This copies
myfile.txt
to
the directory
/tmp/test
without changing the name of the file.
2d
Check this by entering
ls -l /tmp/test
. The file
myfile.txt
should
appear in the list of contents for
/tmp/test
.
To list the contents of home directories of other users, enter
ls ~
username
. In the
example directory tree in
Figure 17.4, “Excerpt from a Standard Directory Tree”
(page 335), one of the sample users is
tux
. In this case,
ls ~tux
would list the contents
of the home directory of
tux
.
NOTE: Handling Blanks in Filenames or Directory Names
If a filename contains a space, either escape the space using a back slash (
\
)
in front of the blank or enclose the filename in single or double quotes. Other-
wise Bash interprets a filename like
My Documents
as the names of two files
or directories. The difference between single and double quotes is that variable
expansion takes place within double quotes. Single quotes ensure that the shell
sees the quoted string literally.
338
Installation and Administration
Содержание LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 11-05-2007
Страница 1: ...SUSE Linux Enterprise Server www novell com 10 May 11 2007 Installation and Administration...
Страница 14: ......
Страница 19: ...Part I Deployment...
Страница 20: ......
Страница 60: ......
Страница 128: ......
Страница 243: ...Part II Administration...
Страница 244: ......
Страница 274: ......
Страница 312: ......
Страница 348: ......
Страница 380: ......
Страница 381: ...Part III System...
Страница 382: ......
Страница 438: ......
Страница 452: ......
Страница 478: ......
Страница 486: ......
Страница 498: ......
Страница 512: ......
Страница 558: ......
Страница 559: ...Part IV Services...
Страница 560: ......
Страница 652: ......
Страница 670: ......
Страница 742: ......
Страница 754: ......
Страница 796: ......
Страница 817: ...Part V Security...
Страница 818: ......
Страница 858: ......
Страница 886: ......
Страница 910: ......
Страница 911: ...Part VI Troubleshooting...
Страница 912: ......
Страница 924: ......