I need to select the PID of a Java process. If I run something like this:
ps -C java -o pid=, it will select all the Java processes. I am after a specific process where the command used to start is
./java -jar /path/to/my/jar.jar
If I try this:
ps -C "./java -jar /path/to/my/jar.jar" -opid= it doesn't work because the selection is not right.
Does anyone know how I can select the PID based on the startup command?