
17.1.3 Working with Directories and Files
To address a certain file or directory, you must specify the path leading to that directory
or file. There are two ways to specify a path:
• The entire (absolute) path from the root directory to the respective file
• A path starting from the current directory (relative path)
Absolute paths always start with a slash. Relative paths do not have a slash at the begin-
ning.
NOTE: Linux Is Case-Sensitive
Linux distinguishes between uppercase and lowercase in the file system. For
example, entering
test.txt
or
Test.txt
makes a difference in Linux. Keep
this in mind when entering filenames or paths.
To change directories, use the
cd
command.
• To switch to your home directory, enter
cd
.
• Refer to the current directory with a dot (
.
). This is mainly useful for other com-
mands (
cp
,
mv
, …).
• The next higher level in the tree is represented by two dots (
..
). For example, to
switch to the parent directory of your current directory, enter
cd ..
.
Examples of Addressing a File
The
cd
commands in
Section 17.1.3, “Working with Directories and Files”
(page 337)
used relative paths. You can use also absolute paths. For example, suppose you want
to copy a file from your home directory to a subdirectory of
/tmp
:
1
First, from your home directory create a subdirectory in
/tmp
:
1a
If your current directory is not your home directory, enter
cd ~
to switch
to it. From anywhere in the file system, you can reach your home directory
by entering
cd ~
.
Working with the Shell
337
Summary of Contents for LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 11-05-2007
Page 1: ...SUSE Linux Enterprise Server www novell com 10 May 11 2007 Installation and Administration...
Page 14: ......
Page 19: ...Part I Deployment...
Page 20: ......
Page 60: ......
Page 128: ......
Page 243: ...Part II Administration...
Page 244: ......
Page 274: ......
Page 312: ......
Page 348: ......
Page 380: ......
Page 381: ...Part III System...
Page 382: ......
Page 438: ......
Page 452: ......
Page 478: ......
Page 486: ......
Page 498: ......
Page 512: ......
Page 558: ......
Page 559: ...Part IV Services...
Page 560: ......
Page 652: ......
Page 670: ......
Page 742: ......
Page 754: ......
Page 796: ......
Page 817: ...Part V Security...
Page 818: ......
Page 858: ......
Page 886: ......
Page 910: ......
Page 911: ...Part VI Troubleshooting...
Page 912: ......
Page 924: ......