Retrieves the absolute path to the executable of a running process
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitignore
Makefile
README.txt
go-pidpath
main.go
pidpath_darwin.go
pidpath_linux.go

README.txt

pidpath - retrieves the absolute path to the executable of a running process

Usage:

	pidpath <pid>

Example:

	ps aux | grep bash
	vagrant   3249  0.0  0.2  23156  5220 pts/0    Ss   22:57   0:00 -bash

	pidpath 3249
	/bin/bash

Install:

	go get github.com/cirocosta/pidpath

Know more:

	https://ops.tips/blog/macos-pid-absolute-path-and-procfs-exploration/#a-golang-binary-that-suits-linux-and-macos