开发者

linux ps aux command [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 12 years ago.

Improve this question

How 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜