How to get the command line args passed to a running process on unix/linux systems?

后端 未结 13 575
梦谈多话
梦谈多话 2020-11-30 16:57

On SunOS there is pargs command that prints the command line arguments passed to the running process.

Is there is any similar command on other Unix env

13条回答
  •  失恋的感觉
    2020-11-30 17:14

    There are several options:

    ps -fp 
    cat /proc//cmdline | sed -e "s/\x00/ /g"; echo
    

    There is more info in /proc/ on Linux, just have a look.

    On other Unixes things might be different. The ps command will work everywhere, the /proc stuff is OS specific. For example on AIX there is no cmdline in /proc.

提交回复
热议问题