There are actually a couple of ways to do this. For versions prior to 8i, there’s a utility in the $ORACLE_HOME/orainst called ‘inspdver’. This will list each product and version on your server. You can also inspect the file $ORACLE_HOME/orainst/unix.rgs.