Novell LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 04-08-2006 Installation Manual page 352

Table of Contents

Advertisement

• 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
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:
2 Now create a new file in your home directory and copy it to the /tmp/test
352
Installation and Administration
Section 18.1.3, "Working with Directories and Files"
a 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 ~.
b 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.
c To check what happened, now enter ls -l /tmp. The new directory
test should appear in the list of contents of the /tmp directory.
directory by using a relative path.
a Enter touch myfile.txt. The touch command with the
myfile.txt option creates a new, empty file named myfile.txt in
your current directory.
b Check this by entering ls -l. The new file should appear in the list of
contents.
c Enter cp myfile.txt ../tmp/test. This copies myfile.txt to
the directory /tmp/test without changing the name of the file.
(page 351)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 10

Table of Contents