title: Linux command get tomcat process id by name
body: <p>Linux command line: </p>
  
  <p>When i execute the following command <code>ps -ef |grep tomcat</code> it shows me the following process</p>
  
  <pre><code>abcapp   28119     1  0 12:53 ?        00:00:19 /usr/java/jdk1.6.0_10//bin/java -Xmx256m -Dabc.log.file=/home/app/apps/rum/logs/dev.log -Dabc.config=dev -Dlog4j.configuration=file:///home/abcapp/env/abc_env/abc_env-1.2/config/log4j-webapp.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/home/abcapp/env/tomcat/tomcat-5.5-26-rum/conf/logging.properties -Djava.endorsed.dirs=/home/abcapp/env/tomcat/tomcat-5.5-26-rum/common/endorsed -classpath :/home/abcapp/env/tomcat/tomcat-5.5-26-rum/bin/bootstrap.jar:/home/abcapp/env/tomcat/tomcat-5.5-26-rum/bin/commons-logging-api.jar -Dcatalina.base=/home/abcapp/env/tomcat/tomcat-5.5-26-rum -Dcatalina.home=/home/abcapp/env/tomcat/tomcat-5.5-26-rum -Djava.io.tmpdir=/home/abcapp/env/tomcat/tomcat-5.5-26-rum/temp org.apache.catalina.startup.Bootstrap start
  </code></pre>
  
  <p>but when i issue following command it shows nothing</p>
  
  <pre><code>pgrep tomcat-5.5-26-rum OR pgrep "*-rum"
  </code></pre>
  
  <p>can some body help me how can i get tomcat process id by its name regex for "*-rum"</p>
  
  <p>Thanks in advance.</p>