Linux

How to Comment Out a Huge Block of Shell Code

Posted on
You might want to comment out some lines of shell script code during debug-time, you can just add a pound sign # to the head of each line like this:$ vi simple_code.sh#!/bin/bashline 1line 2#line 3#line 4line 5line 6In the above code, line 3 and 4 are commented out, it’s an easy and simple work. But […]
Linux

Irix Mode vs. Solaris Mode in Top Command

Posted on
On Solaris, the top command always takes all cpu usage as a maximum 100%, no matter how many cpus are there on the board. In a case of 4 processors on a server, any single process listed on top command will not exceed 25% of overall cpu usage. This is the well-known “Solaris Mode”. The […]
Linux

How to Write Control File into Raw Device

Posted on
Since raw devices cannot be read/write as a normal file operation, you cannot write a controlfile directly into a raw device. I guess DBA will have the problem on 9i or 10g, because 11g database does not support raw devices any longer, but 11g ASM does, and 11g ASM can take care itself through ASMCMD. For […]
Linux

How to Remove No-Name or Empty-Name Files

Posted on
After you finish your shell scripting  you’d like to try your scripts to see the result in your test environment. In the debug phase, you will generate a lot of echo message to see where’s problems, and maybe you will get some unrecognized files, like this:$ ls -iltotal 5    709233 -rw-r–r–   1 oracle   […]