Oracle   Home  

 

Oracle Database 9i, 10g, 11g

Oracle Data Warehouse & BI

Oracle Applications EBS 11i, R12

 Oracle Middleware

SQL & PL/SQL

UNIX/ Linux

   Home  >  Linux/ Unix  >  Linux/ UNIX commands for DBAs

 

UNIX & Linux tutorials

Linux/ UNIX commands for DBAs 

 

 

pwd - The "pwd" command displays the current directory

 

pwd
/home/oracle

 

 

which - The "which" command displays the full path of (shell) commands.

 

which zip
/oracle/db/11.2/bin/zip
 

 

ls - The "ls" command list directory contents

 

ls -altr
 

total 112
-rw-r--r-- 1 oracle dba 310 Feb 15 2008 smit.transaction
-rw-r--r-- 1 oracle dba 171 Feb 15 2008 smit.script
-rw-r--r-- 1 oracle dba 1440 Feb 15 2008 smit.log
drwxr-x--- 3 oracle dba 256 Feb 15 2008 .java
-rw-r--r-- 1 oracle dba 875 Feb 18 2008 sqlnet.log
-rw------- 1 oracle dba 55 May 17 14:42 .vi_history
drwxr-xr-x 2 oracle dba 256 May 19 14:13 .p
-rw-r--r-- 1 oracle dba 356 May 27 14:29 .rhosts
-rw------- 1 oracle dba 212 May 28 10:33 old.Xauthority
drwx------ 2 oracle dba 256 May 28 12:32 .ssh
drwxr----- 3 oracle dba 256 Jul 4 11:38 oradiag_oracle
drwxr-xr-x 6 bin bin 256 Jul 8 14:55 ..
drwxr-xr-x 2 oracle dba 4096 Jul 15 21:39 .vnc
-rw------- 1 oracle dba 263 Jul 15 21:39 .Xauthority
drwxr-xr-x 7 oracle dba 4096 Jul 15 21:39 .
-rwxr----- 1 oracle dba 868 Jul 27 19:32 .profile
-rw------- 1 oracle dba 10866 Aug 2 09:59 .sh_history
 

 

cp - The "cp" command is used to copy files and directories

 

cp [option] SOURCE   DEST

 

cp file1.txt file2.txt
cp * /archive     (the source = *   ---> from current directory; the destination = /archive )
cp /archive/* .   (the source =/archive/* ;  the destination is = .  ---> the current directory)

 

 

mv - The "mv" command is used to move or rename files and directories

 

mv file1.txt file2.txt
mv * /archive     (the source = *   ---> from current directory; the destination = /archive )
mv /archive/* .   (the source =/archive/* ;  the destination is = .  ---> the current directory)

 

 

rm - The "rm" command is used to delete files and directories

 

ls
Dir1 file1.txt
rm file1.txt
ls
Dir1
rm -R Dir1
ls
 

You can use -R in order to remove a directory.

 

 

cd - The "cd" command is used to change directories

 

/home/oracle/myDir>pwd
/home/oracle/myDir
/home/oracle/myDir>cd ../
/home/oracle>cd myDir
/home/oracle/myDir>
 

 

mkdir - The "mkdir" command is used to create new directories

 

mkdir Mydir

 

 

find - The "find" command can be used to find the location of specific files

 

find $ORACLE_HOME -name listener.ora
/oracle/db/11.2/network/admin/samples/listener.ora
 

 

umask - The "umask" command can be used to set the creation file permisions for an (OS) user

 

The umask value is subtracted from the default permissions (666) to give the final/ real permission:
 

666 : Default permission
002 : - umask value
664 : final permission

 

 

chmod - The "chmod" command can be used to change the file permisions

 

chmod 777 myfile.txt

 

Owner      Group      The others    Permission

   7               7               7              read + write + execute
   6               6               6              write + execute
   5               5               5              read + execute
   4               4               4              read only
   2               2               2              write only
   1               1               1              execute only

 

 

chown - The "chown" command is used to change the ownership of files

 

chown oracle:dba tnsnames.ora

chown -R oracle:dba /oracle/base

 

 

ps - The "ps" command lists current process information

 

ps -ef | grep smon

 

 

kill - The "kill" command stop a specific OS process

 

kill -9 3009

 

3009 is the process ID

 

 

More information about  this subject ( Linux/ UNIX commands for DBAs ) you can get from  www.in-oracle.com

 

 

 

Oracle Database 9i, 10g, 11g

Oracle Data Warehouse & BI Oracle Applications EBS 11i, R12  Oracle Middleware

SQL & PL/SQL

UNIX/ Linux

   Home  >  Linux/ Unix  >  Linux/ UNIX commands for DBAs

 

 

Different Romanian Links/ Linkuri romanesti diferite

  1. Invata limba engleza (Learn English language if you are Romanian)

  2. Translator Englez - Roman           Translator Roman- Englez

  Doresti un proiect de arhitectura ieftin (pentru zonele Buzau, Bucuresti sau Prahova) ?

Disclaimer: The views expressed on this web site are my own and do not reflect the views of Oracle Corporation. You may use the information from this site only at your risk. Copyright (c) 2009-2011 Paul Catalin Tomoiu. All rights reserved.