 |
|
Oracle Tips by Burleson |
Navigating the directory
tree
The cd (change directory) command is used to change from
one directory to another. As with creating and deleting
directories, you can change to another directory by using either
a fully qualified directory path or by using a relative path
referenced from the current working directory.
The cd command without any arguments takes you to
the location of your Linux home directory.
sting*testc1-/u01/app/oracle
>cd
sting*testc1-/export/home
>
There are also some special shortcuts that can be used with the
cd command. For instance ‘..’ refers to the parent directory of
the current working directory, ‘~’ refers to your home
directory, and ‘-‘ refers to the last directory you just changed
from. Here are some examples of directory navigation:
$ PS1="\nDirectory:\w\n\\$ " set
prompt to display
directory
Directory:/usr/bin
$ cd /usr/bin change to /usr/bin directory
Directory:/usr/bin
$ cd change to my home
directory
Directory:~
$ cd / change to the / (root)
directory
Directory:/
$ cd ~ change to my home directory
(another method)
Directory:~
$ cd examples change to
/home/tclark/examples
Directory:~/examples
$ cd /tmp change to /tmp directory
Directory:/tmp
$ cd - flip back to previous
directory
/home/tclark/examples
Directory:~/examples
$ cd /home/tclark change to my home directory
(another method)
Directory:~
$
The above book excerpt is from:
Easy Linux
Commands
Working Examples of Linux Command Syntax
ISBN:
0-9759135-0-6
Terry Clark
http://www.rampant-books.com/book_2005_1_linux_commands.htm |