Linux ps aux command

How to get a running process with an absolute path name from ps command

13598 ?        Ssl    0:00 /opt/something --run-id 2 -n /home/laks/f1 -l l.log

I need a conclusion like -

/opt/something --run-id 2 -n /home/laks/f1 -l l.log
+3
source share
4 answers

If I understand the question correctly, just use awk.

ps aux | awk '{print $11}'

Otherwise, just man awklook at the field separator.

+6
source

Using custom format in ps:

ps xa -o cmd

+6
source

, ,

cat/proc/13598/cmdline

+2
which `ps aux | cut -c 66- | cut -d\  -f 1`

, .

+1

Source: https://habr.com/ru/post/1739978/


All Articles