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

后端 未结 13 580
梦谈多话
梦谈多话 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:16

    In addition to all the above ways to convert the text, if you simply use 'strings', it will make the output on separate lines by default. With the added benefit that it may also prevent any chars that may scramble your terminal from appearing.

    Both output in one command:

    strings /proc//cmdline /proc//environ

    The real question is... is there a way to see the real command line of a process in Linux that has been altered so that the cmdline contains the altered text instead of the actual command that was run.

提交回复
热议问题