Useful Linux Commands

February 27, 2012

1) Find the total number of files having a particular string in the name in a particular directory.

ls /directory/ | grep *filename_part* | wc -l

2)

Advertisements

Tibco

February 27, 2012

1. Difference between Tibco EMS and RV : link

2. Tibco Tutorials : link

3. A very nice tutorial on SOA and the messaging patterns used in SOA.

4. A brief history of Tibco

Tibco RV doesn’t support transactional messaging because of the publish subscribe architecture. The messages are stored in flat files and not in a database like in EMS. Guaranteed delivery is a feature of the hub and spoke architecture in EMS. So, EMS is good for transactional messaging while RV is good for publishing market data type of messages which are valid for only a short span of time.

Jargons :

MAMA : Middleware agnostic messaging API

NYSE technologies : HFT tickerplant and One Tick


Automate SCP without prompting for password

February 23, 2012

Problem : I needed to transfer files between to servers on an automated basis. In normal scp, it would prompt for a password and would not allow for automation.

Solution : Add the RSA public key of the sender on the .ssh folder of the receiver.

Steps :

1) On the sender :

mkdir -p ~/.ssh
ssh-keygen -t rsa
ssh-keygen generates, manages and converts authentication keys for ssh(1). ssh-keygen can create RSA keys for use by SSH protocol version 1 and DSA, ECDSA or RSA keys for use by SSH protocol version 2. 
This should result in two files, ~/.ssh/id_dsa (private key) and ~/.ssh/id_dsa.pub (public key).

2) Copy ~/.ssh/id_rsa.pub (public key) to the receiver on the same directory.

scp ~/.ssh/id_rsa.pub user@receiver:~/.ssh/id_rsa.pub

3) Try ssh or scp from the sender to the receiver.

Known Assumption :

The same user has a login on both the sender and the receiver using a single sign-on server.

References :

1) ssh-keygen manpages

2) Extended tutorial