Call (800) 766-1884 for Oracle support & training
Free Oracle Tips


Oracle Consulting Support
Oracle Upgrades
Use New Oracle Features
Oracle Replication Support
Oracle Training
Remote Oracle DBA
System Documentation
Oracle Tips
Oracle Performance
 

Free Oracle Tips


 

HTML Text

BC Oracle tuning

Oracle training

Oracle support

Remote Oracle

 

 

 
 

Oracle Tips by Burleson Consulting
 

The UNIX ls command for Oracle

The DBA often needs to see the most recent files in a filesystem that have been “touched” by a UNIX program. Here we display the most recently touched files in our Oracle bdump directory.

root> ls -alt|head
total 820
-rw-r--r-- 1 oracle dba 163272 Oct 22 11:51 alert_janet1.log
drwxrwsr-x 2 oracle dba 8192 Oct 22 01:55 catalog_export
-rw-r----- 1 oracle dba 10846 Sep 11 04:00 janet1_snp0_25171.trc
drwxr-xr-x 3 oracle dba 2048 Jul 29 10:39 .
-rw-r--r-- 1 oracle nofiles 197053 Jul 29 01:34 alert_janet1.log.old
-rw-r----- 1 oracle dba 573 Jul 16 18:33 janet1_arc2_14380.trc
-rw-r----- 1 oracle dba 573 Jul 16 18:28 janet1_arc1_14300.trc
-rw-r----- 1 oracle dba 1224 Jul 4 12:13 janet1_pmon_25159.trc
-rw-r----- 1 oracle dba 574 Apr 30 10:02 janet1_arc0_25173.trc


Note that the “touch” is different from “changed”. A file is touched anytime that the file is read by a process, but a file is only changed when it has been written.

Below we use the ls command with other arguments to see the most recently changed files. Note that the –c option displays in reverse order and we most pipe to “tail” to see the most recent values:

root> ls -alc|tail
drwxrwsr-x 2 oracle dba 8192 Oct 22 01:55 catalog_export
-rw-r----- 1 oracle dba 602 Oct 22 02:47 janet1_arc0_25005.trc
-rw-r----- 1 oracle dba 574 Oct 22 02:47 janet1_arc0_25173.trc
-rw-r----- 1 oracle dba 600 Oct 22 02:47 janet1_arc0_9312.trc
-rw-r----- 1 oracle dba 600 Oct 22 02:47 janet1_arc0_9425.trc
-rw-r----- 1 oracle dba 573 Oct 22 02:47 janet1_arc1_14300.trc
-rw-r----- 1 oracle dba 573 Oct 22 02:47 janet1_arc2_14380.trc
-rw-r----- 1 oracle dba 1224 Oct 22 02:47 janet1_pmon_25159.trc
-rw-r----- 1 oracle dba 10846 Oct 22 02:47 janet1_snp0_25171.trc
-rw-r----- 1 oracle dba 876 Oct 22 02:47 janet1_snp0_8188.trc


The above is an excerpt from the "Oracle UNIX Administration Handbook" by Oracle press, authored by Donald K. Burleson.

 

Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

 

 

  
 

Oracle performance tuning software 
 
 
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

   

Copyright © 1996 -  2014 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation. 

Hit Counter