linux - How to parse /proc/pid/cmdline -


I'm trying to divide the CMDline of a process on Linux but it seems that I do not trust it Could '\ 0' characters Do you know why sometimes the '\ 0' character is used as a separator and sometimes it is a regular place?

Do you know the executable name and other ways to achieve its path? I am trying to get this information with 'ps' but it always gives the full command line and the executable name is cut.

Thank you.

use string

  $ cat / Proc / self / cmdline | String -1 cat / proc / self / cmdline  

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -