Advanced Oracle Utilities: The Definitive Reference by Rampant
TechPress is written by top Oracle database experts (Bert Scalzo, Donald Burleson, and Steve Callan). The following
is an excerpt from the book.
Before the advent of Windows, PCs were operated from a keyboard using a
command line. PC users were
required to learn these commands in order to perform any tasks using a
PC. During the 1980s,
Microsoft DOS dominated the PC market, while the early UNIX command
systems were used on larger multi-processing servers.
The main difference between UNIX and DOS is that DOS was
originally designed for single-user systems, while UNIX was designed for
systems with multiple users.
While PCs have evolved into GUI interfaces such as Microsoft Windows,
X-Windows, the windowed interface for UNIX systems, has never really
gained general acceptance.
Hence, The Oracle professional
must master a bewildering number of cryptic UNIX commands in order to
manage and master the Oracle database.
One of the most difficult issues for the UNIX neophyte is being
confronted with a complex, and usually undocumented UNIX command.
The cryptic nature of UNIX is such that even the most seasoned
UNIX professional may have trouble deciphering the purpose of the
command. In addition, there
is often more than one single way to perform any number of operations
within Unix. Some Unix professionals delight in finding the most obscure
method to perform a simple operation or spend hours trying to reduce a
complex operation into the absolute minimum number of commands, almost
as if obscurity is one of the goals to be achieved in completing the
operation. Now examine a typical cryptic UNIX command and then apply a
simple set of rules to decipher the command.
Since UNIX and MS-DOS were developed at the same time and must
accomplish similar functions they share some common syntax, the UNIX
beginner will be happy to find many common commands and concepts.
Table 2.1 shows some of the commonality between UNIX and MS-DOS
commands:
UNIX |
MS-DOS |
COMMAND FUNCTIONS |
--
|
cd -
|
Switch between current and last directory
|
cat
|
Type
|
Displays the contents of a file
|
cd
|
Cd
|
Moves from one directory to another
|
cd /u01/test
|
cd c:\u01\test
|
Change directory paths
|
cd ..
|
cd..
|
Go up in directory
|
chmod
|
Attrib
|
Sets file permissions
|
clear
|
Cls
|
Clear the screen
|
cp
|
copy
|
Copies a file (or a group of files)
|
diff
|
fc
|
Compare two files
|
cpio
|
xcopy
|
Backs up and recovers files
|
date
|
date
|
Display the system date
|
doskey
|
<ctl> k (3)
|
Display command history
|
export PS1='xx'
|
prompt
|
Change the command prompt text
|
find
|
grep
|
Find a character string in a file
|
gzip
|
dblspace
|
Compress a data file
|
ln
|
--
|
Forms a link to a file
|
lp
|
print
|
Queues a file for printing
|
lpstat
|
print
|
Displays the printing queue
|
ls -al
|
dir
|
Displays the contents of a directory
|
mem
|
lsdev (2)
|
Display RAM
memory
|
mkdir
|
md
|
Creates a new subdirectory
|
move
|
cp (4)
|
Move a file to another directory
|
mv
|
rename
|
Renames a file
|
rm
|
del
|
Deletes a file (or group of files)
|
rmdir
|
rd
|
Deletes an existing directory
|
setenv (1)
|
set
|
Set an environment variable
|
sort
|
sort
|
Sorts lines in a file
|
ver
|
uname -a
|
Display OS version
|
Vi (emacs?)
|
edit
|
Creates and edits text
|
Table 2.
1:
UNIX and MS-DOS Command
Utilities
1.
C-Shell command
2.
Solaris command
3.
With "set –o vi" command
4.
No direct UNIX equivalent
As can be seen here, being productive with UNIX involves learning many
commands and combinations of commands.
Rather than attempting to teach every possible UNIX command, this
chapter will focus on those commands most useful to perform basic Oracle
database management commands.