Monday, July 12, 2010

Running a background process - Using the nohup command in UNIX

Command:  
            nohup command &


For example:


If you want to run a java program as a background process you can do the following:

nohup java -cp ./wikify/bin:./wikify/mysql-connector-java-3.1.13-bin.jar:./wikify/trove.jar:./wikify/weka.jar:/usr/share/tomcat6/lib/servlet-api.jar:./wikify/src/org/wikipedia/miner/service/ org.wikipedia.miner.service.WikipediaMiner &


You r program will be running in the background even if you logout from your terminal. Use Kill command to terminate the nohup command

No comments:

Post a Comment