Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Monday, February 10, 2014

How to open GUI on Unix using Exceed XServer

 

1. Find out the IP address of Host Windows machine

   PING hostname

2. start the X server...

Example C:\Program Files (x86)\Hummingbird\Connectivity\13.00\Exceed\

3. Hover over the Exceed icon and see what "port" it is using

image

4.  Set the DISPLAY variable with IP:Port

   image

5. Start DBCA (you may use a different GUI) and the GUI is running on the terminal server

 image

image

Thursday, November 01, 2012

Creating Hard link and Soft Links in Unix

 

Hard Link Soft Link / symbolic  Link
If the inode entries are the same and if the count is 2 then they are hard linked.

if you see filename --> linked_directory
Then its a symbolic link.

la –lia ls -a
ln <source> <target file> (without the option –s which stands for soft link). ln  -s <source> <target file> (with the option –s which stands for soft link).
It is essentially create identical copies, No matter  which one you update,  both of them will get updated  
both links must reside on the same filesystem,
the source file must exist
that are not applicable to softlinks (source and target can be on seperate file systems, source does not have to exist, etc.)
additional I/O necessary to complete file access, additional storage taken up by softlink file's data
  A "soft" link does not increase the inode count for the referenced file, a "hard" link does.

If the count = 1, it's a soft link. If the count is > 1, it's a hard link.

Example of Viewing existing Hard link

ls –lia

1. Same iNode number  : 245787
2.  After permission column it lists 2

oracle@test:/app/oracle/product/11.2.0.3/grid/network/admin $ ls -lia
total 120
153544 drwxr-xr-x   4 oracle     dba           1024 Sep 12 04:27 ./
153543 drwxr-xr-x  11 oracle     dba           1024 Aug 27 17:39 ../
250089 drwxr-xr-x   2 oracle     dba           1024 Oct 17 12:58 OLD/
167535 -rw-r--r--   1 oracle     dba           1580 Sep  4 05:01 listener.old
153001 -rw-r--r--   1 oracle     dba           4524 Oct 17 13:01 listener.ora
159439 -rw-r--r--   1 oracle     dba            205 May 11  2011 shrept.lst
167531 -rw-r--r--   1 oracle     dba            881 Aug 27 18:17 sqlnet.ora
245787 -rw-r--r--   2 oracle     dba          43224 Sep 25 01:38 tnsnames.ora

oracle@test:/app/oracle/product/11.2.0.3/grid/network/admin $ cd $TNS_ADMIN

oracle@test:/app/oracle/product/11.2.0.3/db/network/admin $ ls -lia
total 102
168564 drwxr-xr-x   4 oracle     dba           1024 Sep  7 00:29 ./
168563 drwxr-xr-x  11 oracle     dba           1024 Aug 27 18:11 ../
158839 drwxr-xr-x   2 oracle     dba           1024 Sep 25 01:35 OLD/
164004 -rw-r--r--   1 oracle     dba           2690 Sep  7 00:29 listener.ora
168565 drwxr-xr-x   2 oracle     dba             96 Aug 27 18:00 samples/
178592 -rw-r--r--   1 oracle     dba            205 May 11  2011 shrept.lst
245790 -rw-r--r--   1 oracle     dba            881 Aug 27 18:17 sqlnet.ora
245787 -rw-r--r--   2 oracle     dba          43224 Sep 25 01:38 tnsnames.ora

Example of viewing SoftLink

oracle@test1:/app/grid/product/11.2.0.3/network/admin $ ls -lia
total 82
   343 drwxr-xr-x   4 oracle     dba           1024 Aug 24 17:01 ./
   342 drwxr-xr-x  11 oracle     dba           1024 Aug  9 09:55 ../
16349 drwxr-xr-x   2 oracle     dba           1024 Sep  7 12:43 OLD/
12489 -rw-r--r--   1 oracle     dba            186 Aug  9 10:26 endpoints_listener.ora
12165 -rw-r--r--   1 oracle     dba           1568 Sep  7 12:46 listener.ora
12488 -rw-r--r--   1 oracle     dba            534 Aug  9 10:26 listener.ora.bak.usfspfd1
12477 -rw-r--r--   1 oracle     dba            368 Aug  9 10:26 listener12080910AM2605.bak
   344 drwxr-xr-x   2 oracle     dba             96 Aug  9 09:49 samples/
  5108 -rw-r--r--   1 oracle     dba            205 May 11  2011 shrept.lst
22677 -rw-r--r--   1 oracle     dba            561 Aug 13 18:33 sqlnet.ora
12487 -rw-r--r--   1 oracle     dba            646 Aug  9 10:26 sqlnet.ora_temp
22674 -rw-r--r--   1 oracle     dba          29904 Aug 23 16:09 tnsnames.old
 42504 lrwxr-xr-x   1 oracle     dba             58 Aug 24 17:01 tnsnames.ora@ -> /app/oracle/product/11.2.0.3/db/network/admin/tnsnames.ora
oracle@test1:/app/grid/product/11.2.0.3/network/admin $ cd $TNS_ADMIN
oracle@test1:/app/oracle/product/11.2.0.3/db/network/admin $ ls -lia
total 82
150342 drwxr-xr-x   4 oracle     dba           1024 Aug 21 16:29 ./
150341 drwxr-xr-x  11 oracle     dba           1024 Aug  9 11:36 ../
214228 drwxr-xr-x   2 oracle     dba           1024 Oct 30 22:55 OLD/
268044 -rw-r-----   1 oracle     dba           3554 Aug 14 14:43 listener.ora
150343 drwxr-xr-x   2 oracle     dba             96 Aug  9 11:23 samples/
170627 -rw-r--r--   1 oracle     dba            205 May 11  2011 shrept.lst
268082 -rw-r--r--   1 oracle     dba            561 Aug 14 14:50 sqlnet.ora
266832 -rw-r--r--   1 oracle     dba          32061 Oct  9 10:42 tnsnames.ora

Friday, October 28, 2011

HP-UX DOSKEY equivalent functionality

 

To use the DOSKEY functionality on the HP-UX, in your environment or execute on terminal

Code:

set -o vi

Then you hit escape then with 'k' and 'j' scroll commands (up and down ,like in vi editor).

Then you can use the keystroke sequence <esc>/k to present the last command typed for editing. Move backwards or forwards through the command history using the "-" or "+" keys respectively. If you find a command you want to edit, type "v" which will invoke "vi". Then after editing, use the usual ":wq!" to exit vi and the edited command will execute.

Tip: If you decide to not execute any command (edited or not), blank the command in vi (eg. the "dd" vi command) and then ":wq!".

Friday, September 23, 2011

find: missing conjunction

$  find . -type d –name siva*

Resolution:  Use single quote on the string in –name clause

Ex:   $  find . -type d –name ‘siva*’

Friday, August 26, 2011

ksh: =: is not an identifier

 

Error:  ksh: =: is not an identifier
-------------------------------------------------------------------------------------------
Cause:  Space between VariableName, = and Value

Resolution: Remove the space betwen Variablename, = and Value

Example

oracle@myDBSrvr1: export ORACLE_HOME = /app/oracle/product/11g/db_1
ksh: =: is not an identifier
oracle@myDBSrvr1: export ORACLE_HOME=/app/oracle/product/11g/db_1

Thursday, July 28, 2011

How to find what Shell being used on the server

 

siva@mydbsrvr1:/home/oracle $ echo $SHELL
/usr/bin/ksh


You can find out what shell you are using by the command: echo $SHELL

Environment Variables in Unix
By prefixing $ to the variable name, you can evaluate it in any command

Wednesday, July 27, 2011

How to list hidden files in Unix


On ls command use the –a option.
-a Shows you all files, even files that are hidden (these files begin with a dot.)

ls -a

Friday, May 20, 2011

How to find the Oracle databases running in a Unix Server?

 

First Option:
It will list all the currently running instances

ps -eaf | grep pmon | grep -v grep | awk ' {print $9}' | cut -c10-18

Second Option:
Check for the Oratab entries

Wednesday, May 11, 2011

How to reset the Unix Prompt to default? ( PS1)


How do I get my prompt to show the current directory, like on DOS?

PS1 – stands for Prompt String 1

In korn shells

PS1='$PWD$ '


in Bourne shells

PS1="`pwd` "