Finding the full paths for running processes in unix

Finding the full paths for running processes in unix…

Let us say that you wanted to find the processes that were running with the string classpath in it. You could or might type something like:

$ ps -eaf |grep -i 'classpath'

This would give you a list of all running processes where the string classpath¬†were present… similar to this output:


Notice the line above with the long classpath, it gets cut off after ‘…/opt/sgh…’. This can be very annoying, because there are times when you will need the full line for whatever your reasons!

Next time, try typing this instead:

$ /usr/ucb/ps -aux -www |grep -i 'classpath'

This should give you the full line in the output as in the example below:


Notice in the above output, you’ll see the full line of the process, which allows you to see the full classpath,¬†where before it was getting cut off…

Pleasant ones…. :0)