Tuesday, March 31, 2009

scp fails to copy subdirs and files

Suppose xxx.xxx.xxx.xx and yyy.yyy.yy.y are the IP's of the servers and you want to copy from x to y server, then the format is

Login to yyy.yyy.yy.y

scp username@xxx.xxx.xxx.xx:/Desktop/filename /Documents

scp -R username@xxx.xxx.xxx.xx:/directory_name /Documents

Now file will be copied to /Documents in y server. If it is folder as u asked then use -r with scp, or may be -R, am not sure if its upper case or lower case. It copies the recursively. To copy a directory or folder -r ot -R option shld be used with scp. Try to copy as root user coz u may encounter permission issues when a normal user tries to copy files to desktop or / etc etc...Enjoy your copying

Monday, March 23, 2009

ACE for Cygwin

versions: Cygwin CYGWIN_NT-5.1
ACE 5.5.1
g++ 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)

(cmake is available by cygwin project)

Before making ACE

  1. Get and decompress tar ball (e.g. /work/ACE_wrappers).
  2. Set an environment variable;
 export $ACE_ROOT=/work/ACE_wrappers
  1. Create some symbolic links;
 cd $ACE_ROOT/include/makeinclude
ln -s platform_cygwin32.GNU platform_macros.GNU
cd $ACE_ROOT/ace
ln -s config-cywin32.h config.h

Setting include path

Compiling ACE generates many errors by default of cygwin. It is because the preprocessor of g++ on cygwin behaved in a strange way. It regards the lines "signal.h" or so on in /usr/include/*.h files as the same name files in ACE.

Solution: To avoid this errors, you should export an environment variable like:

 export CPLUS_INCLUDE_PATH=/usr/include:/usr/local/include:$CPLUS_INCLUDE_PATH

and

 make

Then you can compile ACE without any errors. This issue is not declaired at the official homepage of ACE/TAO.

Local Installation

To install ACE to your cygwin,

 cp -r $ACE_ROOT/ace /usr/local/include
cp $ACE_ROOT/lib/* /usr/local/lib

To tell your cygwin where is the ACE dynamic libraries,

 export PATH=/usr/local/lib:$PATH"

cygwin cannot search the libraries without setting PATH variable properly. It's a specification of cygwin.


Additional step to test ACE:

 cd $ACE_ROOT/tests
make
perl run_test.pl

Friday, March 20, 2009

Free SMS to Australia

any mobile Australia wide..

site : http://www.web2msg.com/Default.aspx

limit :- 5 sms per/day

Thursday, March 12, 2009

how to get core dump

if on crash your program does not produce a coredump then check if you set up your console to ensure that dumps are created?

The command is ulimit -c 50000 where 50MB is the size in bytes.

- Mihir Patel