Unix for the Oracle DBA

Unix commands for oracle dba

List of Oracle instances running on the server:

List the listeners running on the server:

get free memory:

on linux:

on solaris :
on all unix platform :

List files larger than 50M in a directory:

List top 10 larger files in a directory:

List directory structure ordered by size (perl needed):

Delete files older than 30 days:

Get directory or file size:

List mount points:

Find files containing searched string:

Compare the content of two files:

this will compare the two files and return lines that are in file2 but not in file1.

you can also use :

This will list all lines with differences.

Keep jobs active when disconnecting:

The screen command allow you to detach you terminal like a process, disconnect from server and then restore you terminal like you left it when you disconnected.
Once logged on server type command:

Do your actions, maybe run a long sqlplus script and then press Ctrl-A followed by Ctrl-d
This will detach your terminal, from there you can leave the server, you terminal persist.
When you comeback to the server, just type:

This will restore your terminal like you left it.

4 thoughts on “Unix for the Oracle DBA

  1. Hi Cyrille, you can also display the free memory with the column “free memory” of vmstat 😉

  2. You’r welcome Cyrille. vmstat free memory column validated on Solaris and Linux. On Linux you can also find the free memory with “top”. Have a nice day!

Leave a Reply