Skip to content

Instantly share code, notes, and snippets.

@alces
Last active November 9, 2015 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alces/6197260739a298e4ff81 to your computer and use it in GitHub Desktop.
Save alces/6197260739a298e4ff81 to your computer and use it in GitHub Desktop.
How to show a name of user a process with a given PID runs on behalf of

In order to see a name of user starting a process with a given PID the command bellow could be helpful:

ps ho user -p `cat /some/pid/file`

Entering a dash before h argument doesn't work on Linux with the following error message:

Warning: bad syntax, perhaps a bogus '-'?

dash before o argument works okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment