Oracle UNIX pwd Command
Oracle Tips by Burleson Consulting
Advanced Oracle Utilities: The Definitive Reference by
Rampant TechPress is written by the top Oracle
database experts (Bert Scalzo, Donald
Burleson, and Steve Callan). The following is an excerpt
from the book.
The UNIX pwd
The pwd command is
probably the most commonly used UNIX command.
It is short for Print Working Directory, and it tells where
the DBA is located in the UNIX tree structure.
For example, issue the pwd command to see the current
The pwd command is
very important, and many Oracle DBAs and UNIX system
administrators place the output of the pwd command in their
command prompt so they always know their current directory.
This is done by setting the UNIX PS1 system variable:
With this setting,
the UNIX prompt will change to always show the hostname, the
$ORACLE_SID and the current working directory:
The UNIX ls
frequently used UNIX command is the ls command.
Without any arguments, the ls command will show a list of
all files in the current directory:
When the –a and –l
arguments are added, all of the details for each file in the
current working directory are shown:
root> ls –al
drwxr-xr-x 21 oracle
Aug 22 20:47 .
drwxr-xr-x 10 root
512 Jul 26 08:49 ..
437 Aug 12 20:43 .bash_history
drwxr-xr-x 11 oracle
4381 Jul 16 13:20 .profile
2264 Sep 3
512 May 10 11:10 .ssh
3861 May 29 06:03 Mailbox
12632 Apr 11 16:09 ad.sql
512 Jan 26
55 Aug 22 11:56 afiedt.buf
Below is a listing
of each of the columns in the ls –al command so their meaning is
The Columns in the ls –al UNIX Command
The first column
in the ls –al command shows the file permissions.
The permissions are a set of letters arranged in a group of
three, one for the file owner, one for the file group and another
for the world (Figure 1-3).
The third and fourth columns of the
command lists the owner and group of the file.
Note that if there is super-user authority (root), change
the owner and group of any file with the
command. The fifth column is the
file size in bytes, the sixth column lists the last modified date
and the last column is the name of the file.
“Dot” files in UNIX
The –a option of
the ls command is used to display the “dot” files, which are not
normally seen with the ls command.
“dot” files are those files whose name begins with a period
(“.”). Some “dot”
files that are of special interest to the Oracle DBA:
files – These file keep a complete audit of each and every UNIX
command issued by the UNIX user. These include .sh_history, .bash_history
Login files –
These files contain login scripts that are executed every time the
user signs on to UNIX.
These include .profile, .cshrc, .kshrc and .bshrc,.
r more details on Oracle utilities, see the book "Advanced
Oracle Utilities" by Bert Scalzo, Donald K. Burleson, and Steve Callan.
You can buy it direct from the publisher for 30% off directly from