Saturday, September 24, 2011

FIND and REPLACE in unix

Many times we want to find and replace all the occurences of  one word in a file to another word in Unix. Using the power of vi editor, it can be done easily.
Here is the syntax for the same in unix

:1,$s/oldword/newword/g

example
To find and replace all occurences of "erp" with "BERP" in a file, we have to do the following->
Open the file in vi editor, and issue the following command
:1,$s/erp/BERP/g

Thursday, September 22, 2011

Oracle Installation Error

Long time back, while installing Oracle on Windows XP, i faced the following strange problem.

"Error in writing to directory "C:\DOCUME~1\XP\LOCALS~1\Temp\OraInstall2009-04-12_08-26-12PM. Please ensure that this directory is writable and has atleast 60 MB of free space. Installation cannot continue."

I checked that the directory was writable and C: had over 5 GB free space.The solution was however, also very strange.
I copied the software directory directly in C: and then started the installation. It worked without any error.
Earlier i was running the setup from "Desktop". Even running it from "My Documents" did not work.

Happy Installation!!