Welcome to my blog !


Linux and Unix PS commands Examples

November 15, 2011 ·  4 min read

process status command Unix/Linux Examples PS abbreviated as process status command list information about the active process running in the Linux/Unix machine. this command list out all the active running process of a shell. We will see frequently used ps command examples in below sections. All these commands execute in the Linux/Unix command line ps command without arguments Ps command without arguments list out all the process of a current shell...

How to avoid ConcurrentModificationException for map or List

November 11, 2011 ·  1 min read

ConcurrentModificationException exception is occurred because of while one thread is iterating the collections and other thread trying to modify the object in collections. This will be happened for below map and list of collections. 1. Modifying state of any key or value in map implementations(example,HashMap,HashTable,LinkedHashMap) during iteration of Map objects 2.Adding/remove(Iterator.remove) the object in a collections class while iteration of collection of objects at the same time. you can use ConcurrentHashMap for avoiding this exception but there is no guarantee of all your objects are iterated....

zgrep and zcat ussage

February 18, 2011 ·  1 min read

finding content in uncompressed files (extension, gzip). In a directory, there are many .gz files, how do we search for a particular word in those files. one solution is to unzip the .gz file and use the grep command. Here are the steps gunzip filename.gz grep “searchword” file The other and better solution is using zgrep command in unix zgrep “search word” filename.gz grep command work on text files, zgrep works on compressed logs....

Maven dependency example explained

February 3, 2011 ·  2 min read

One of the features of Maven over ant tool is dependencies management for software projects. When you are using maven in your project, you need to define the dependencies in pom.xml, once the dependencies are defined, these will be downloaded into your local machine from repositories. To configure the dependencies, you have to use the dependency plugin which manipulates the artifacts when you are installing with maven So here is sample code snippet for configuring spring-core to your project...

Install and configure maven Tutorials

December 6, 2010 ·  2 min read

Maven is a build tool to automate the build process of java based projects.Java development environment is required for maven installation on any platform. Before installing maven, Please make sure that you installed latest JDK version Install and setup maven on local windows: Download maven software from apache site and extract the files, copy it local drive example D:\java\apache-maven-3.0.3. Before that, you need to set below environment variables on your local box...