Sunday, May 9, 2010

Move large number of files in solaris using "awk"

  • Change directory where your files are located.
  • Use the following "awk" script to move files from one location to another.
  for k in `ls | awk '{print $1}'`; 
  do 
  mv $k destination;
  done

Monday, May 3, 2010

Use java 64 bit version

You have to use 64bit version of java when your memory allocation is larger than 4Gb.

Use -d64 parameter when running the application.

java -d64 -jar -Xms1024m -Xmx4096m Test.jar

Sunday, May 2, 2010

Type Cast in Java Script

In js, variables are created as var type. That means, js engine can cast it to the original type by itself.

parseInt(12) will be converted 12 to an Integer value.

           Example                           Result 
parseInt("12")                          12
parseInt("12.657")                    12
parseInt("12aaaa")                   12
parseInt("aaaa")                NaN (means "Not a Number")