Hide sqlldr Oracle Password in PS Command

Our internal audit team has raised an issue on some scripts exposing database user, password and tns. You see, all you need is an access to unix shell and run ps command and you’ll be able to get the user id and password of the database. On the otherhand, there’s not a lot of people who have access to the unix shell. But regardless, it’s still a security vulnerability and must be rectified. Here’s how.
[Read more...]

Incoming search terms:

  • hide oracle user on ps unix
  • sqlloader connectionstring
  • SQLLDR parfile
  • sqlldr oracle
  • sqlldr in connection string
  • sqlldr hide userid
  • sqlldr connection string hide
  • sql loader unix parfile example
  • sql loader parfile comments
  • ps -ef sqlldr

How to Get The First File in Unix

In case you are looking files using ls or find command and only want to get the first file found, the command would be like.

ls -l /any/path/filename*|sed -e 's/\//,/g'|awk -F "," '{print $NF}'|head -1

Of course, you can also use it in find command.


find /any/path/ -name "filename*" -type f|sed -e 's/\//,/g'|awk -F "," '{print $NF}'|head -1

[Read more...]

Incoming search terms:

  • unix find first file
  • find first unix
  • find firt file
  • get the first file unix
  • how to fetch last month files in unix
  • shell find first file only

How to Display Seconds in Unix File Timestamp

Apparently, there’s no native shell command to show the seconds portion of a unix file timestamp. The nearest to this functionality is stat. However, it’s not always available in unix systems. I’m using HP-UX and it’s not installed on our server.

Instead, I needed to use a one-line perl program shown below.

perl -e .foreach(@ARGV){$t =localtime ( ( ( stat ( $_ ) ) [9] ) ); printf(.%-20s %s\n.,$_,$t);}. filename.txt

My perl knowledge is limited to its name. I have nothing beyond that. That’s my way of saying ‘I don’t know what it is.’ But it works!


Source:

http://www.unix.com/shell-programming-scripting/41325-command-get-file-timestamp-including-seconds-aix-5-3-a.html

Incoming search terms:

  • unix file timestamp
  • unix file timestamp seconds
  • how to get timestamp of a file in unix
  • how to get the timestamp of a file in unix
  • show timestamp in seconds for unix file
  • show timestamp in seconds
  • show seconds stat
  • seconds timestamp of a file in unix
  • unix time of file in seconds
  • perl one liner unix file timestamp

SpotVPS First Impressions

After the unfortunate incident last week with NordicVPS, I decided to look for a new VPS host. As usual, I went to lowendbox and get the reviews in webhostingtalk. It’s there where I stumbled upon a promo from SpotVPS. As it turns out, SpotVPS is a low-cost VPS offering of ComfortHost.NET.

And who are they? Here’s what they say about themselves.

ComfortHost.NET have been here since 2004 offer high quality web hosting solutions. All SpotVPS nodes are fully owned hardware and are colocated. All servers used by SpotVPS have been bought with internal cash. Our only monthly cost for these servers are the actual colocation. We are financially healthy and profitable since day one. We are NOT going out of buisness any time soon. We are in it for the long run!

ComfortHost on http://www.webhostingtalk.com/showthread.php?t=1110770

Here’s the plan that I got.
$6.99/mo Ultimate Plan
Memory: 2048mb (2gb)
HD Space: 50gb (50,000mb)
Bandwidth: 1,000gb (1TB)
Monthly Price: $6.99/mo
Setup Fee: FREE!
FREE GIGABIT PORT – FREE WEEKLY BACKUPS – FREE HARDWARE RAID
Location: Orlando, FL at DimeNOC
Test IP Address: 72.29.87.105

2GB RAM for $6.99. That’s sweet. Want to try it yourself? ORDER NOW

Word of caution,though. This plan (and all other dirt-cheap vps that I know of) comes with very limited support. You are usually given your VPS, IP and OS install and you have to do the rest. I installed mine with NGiNx, PHP, MySQL and it’s already up and running for 7 days straight now.

Here’s the result of the test I made on my VPS.

[root@vps ~]# dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 14.9939 seconds, 71.6 MB/s

[root@vps ~]# wget cachefly.cachefly.net/100mb.test
--2011-11-24 18:10:35-- http://cachefly.cachefly.net/100mb.test
Resolving cachefly.cachefly.net... 205.234.175.175
Connecting to cachefly.cachefly.net|205.234.175.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 104857600 (100M) [application/octet-stream]
Saving to: `100mb.test'

100%[==============================================================================================================================>] 104,857,600 66.8M/s in 1.5s
2011-11-24 18:10:36 (66.8 MB/s) - `100mb.test' saved [104857600/104857600]

I’ll try to come up with a review together with my other hosting providers. :)

Incoming search terms:

  • comforthost spotvps
  • spotvps
  • spotvps reviews
  • cachefly vps
  • vps wget 10 mb test file
  • vps cachefly test
  • spotvps net
  • spotvps ip location
  • spotvps coupon
  • spotvps 2gb ram

Apache Cannot Allocate Memory Problem

For the past month, I have been encountering some problems with my WordPress installation. I keep getting the Error 500. I checked the log files and here’s what I found.
(12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for
[Read more...]

Incoming search terms:

  • Cannot allocate memory: couldn\t create child process: /opt/suphp/sbin/suphp
  • Cannot allocate memory: couldnt create child process: /opt/suphp/sbin/suphp
  • apache cannot allocate memory
  • cannot allocate memory
  • (12)Cannot allocate memory: couldn\t create child process: /opt/suphp/sbin/suphp
  • cannot allocate memory apache
  • cannot allocate memory: couldn\t create child process: /opt/suphp/sbin/suphp for
  • apache can not allocation mem
  • (12)cannot allocate memory couldnt create child process /opt/suphp/sbin/suphp
  • apache allocate memory

Recursive setacl command on Linux/Unix

Setting access control list(acl) recursively is not as straigthforward in HP/UX. I believe the same is true for other Unix flavors. In case you are wondering how, the command is shown below.
[Read more...]

Incoming search terms:

  • setacl linux
  • linux install command recursive
  • hp ux commands find recursive
  • setacl recursive
  • setacl hp-ux file
  • setacl in hp unix
  • setacl kwatog
  • -r recursive in linux command
  • setacl recursive hp-ux
  • setacl recursive in hp-ux