Just How Well Do You Know Your Oracle Home Directory Tree?

How Deep is Your…Oracle Home?
This is likely the most trivial of pursuits sort of posts I’ve made in a long while. Please don’t ask me why, but I had to take a few minutes to inventory directory depth in an Oracle Database 11g Enterprise Edition (with Real Application Clusters) Oracle Home directory tree on Linux. The data in the following box shows each directory depth that exits under my Oracle Home and a tall of how many directories are nested that deeply.

Maybe we should all breathe a sigh of relief that there are only 3 directories laying 13 levels deep? That is, after all, only .07% of all directories (4208) under a typical 11g Oracle Home! I’m not losing sleep.

Hey, like I said, trivial pursuit. Ho hum.

SQL> select d,count(*) from oh_dirs
  2  group by d
  3  order by 2 desc ;

         D   COUNT(*)
---------- ----------
         8        796
         5        729
         6        663
         4        651
         9        437
         7        369
         3        306
        10        145
         2         70
        11         31
        12          6

         D   COUNT(*)
---------- ----------
        13          3
        14          1
         1          1

14 rows selected.

SQL> select count(*) from oh_dirs;


4 Responses to “Just How Well Do You Know Your Oracle Home Directory Tree?”

  1. 1 Bernd Eckenfels April 6, 2009 at 11:53 pm

    How did you populate oh_dirs?


    • 2 kevinclosson April 7, 2009 at 12:44 am

      cd $ORACLE_HOME
      find . -type d -print | sed -e ‘s~/~#~g’ -e ‘s/[^#]//g’ | while read dir
      do echo -n “$dir” | wc -c
      done | while read cnt
      echo “INSERT INTO oh_dirs VALUES (‘$cnt’);”

  2. 3 Eric Gross April 10, 2009 at 3:42 am

    When I first saw this I thought you were talking about the depth of the beginning of the OH – I am always amazed at shops with the unruly combination of 6+ level deep OHs and a failure to use tab completion.

    • 4 kevinclosson April 10, 2009 at 4:43 pm

      Nope…this is a look the various depths and count of each depth starting in OH … trivial pursuit mostly… (well, not really, but I’m not blabbering about why I was looking at that stuff anyway 🙂 )

      Hey, say “Hi” to Matt for me would ya?

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


I work for Amazon Web Services. The opinions I share in this blog are my own. I'm *not* communicating as a spokesperson for Amazon. In other words, I work at Amazon, but this is my own opinion.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 746 other subscribers
Oracle ACE Program Status

Click It

website metrics

Fond Memories


All content is © Kevin Closson and "Kevin Closson's Blog: Platforms, Databases, and Storage", 2006-2015. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Kevin Closson and Kevin Closson's Blog: Platforms, Databases, and Storage with appropriate and specific direction to the original content.

%d bloggers like this: