Tag: cmdline

  • Displaying /proc/PID/cmdline with space

    Displaying /proc/PID/cmdline with space

    On linux, the file /proc/PID/cmdline shows the command line for the process. If you check content of this file, you will see the command, but arguments are not seperated by space.

    To display the command line with space, run

    cat /proc/PID/cmdline | tr '\000' ' '
    

    Or

    cat /proc/PID/cmdline  | xargs -0 echo
    

    Example

    To display environ file, run

    cat environ  | xargs -0 -L1  echo