linux ps aux command [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this questionHow obtain the running process with absolute path name from ps command
13598 ? Ssl 0:00 /opt/something --run-id 2 -n /home/laks/f1 -l l.log
开发者_开发百科
I need the output as -
/opt/something --run-id 2 -n /home/laks/f1 -l l.log
If i understand the question correctly, just use awk
.
ps aux | awk '{print $11}'
Otherwise just do man awk
and look at the field separator.
Using user-defined format in ps
:
ps xa -o cmd
Okay I got the answer ,
cat /proc/13598/cmdline
HTH
which `ps aux | cut -c 66- | cut -d\ -f 1`
will list absolute paths of all of the processes, you could work with that.
精彩评论