Reputation: 11
I am using linux centos. I have installed tomcat in multiple folders. One of them is running.
When I use netstat -ntlp
command, it says port 8080 is running, and I can access the URL http://localhost:8080
Now I want to know the path of tomcat folder where it's running?
Assume I closed all the terminals, I could not guess where I initiated..
Thanks in advance..
Upvotes: 1
Views: 2230
Reputation: 522
ps aux | grep tomcat
And you will know the installation directory of tomcat.
You can also use "locate" command as "locate tomcat" this command will find out the files named tomcat which might give you a pointer where tomcat is residing on your disk. :)
Upvotes: 0
Reputation: 11587
do a ps -ef grep for tomcat the result will have the directory of tomcat
[user@edw-support-dev1 ~]$ ps -ef | grep tomcat
root 12898 1 0 May14 ? 00:30:38 /usr/local/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-7.0.41/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx2048m -XX:PermSize=2048m -XX:MaxPermSize=2048m -Djava.endorsed.dirs=/opt/apache-tomcat-7.0.41/endorsed -classpath /opt/apache-tomcat-7.0.41/bin/bootstrap.jar:/opt/apache-tomcat-7.0.41/bin/tomcat-juli.jar -Dcatalina.base=/opt/apache-tomcat-7.0.41 -Dcatalina.home=/opt/apache-tomcat-7.0.41 -Djava.io.tmpdir=/opt/apache-tomcat-7.0.41/temp org.apache.catalina.startup.Bootstrap start
2064 21567 21544 0 21:28 pts/1 00:00:00 grep tomcat
Upvotes: 1