On Linux, the symlink /proc/<pid>/exe
has the path of the executable. Use the command readlink -f /proc/<pid>/exe
to get the value.
On AIX, this file does not exist. You could compare cksum <actual path to binary>
and cksum /proc/<pid>/object/a.out
.
More Related Contents:
- How to permanently set $PATH on Linux/Unix [closed]
- Get exit code of a background process
- How to get full path of a file?
- Should PATH contain directories or full paths to binaries?
- Linux/Unix command to determine if process is running?
- What is PATH on a Mac (UNIX) system?
- grep lines that contain 1 character followed by another character
- How to convert DOS/Windows newline (CRLF) to Unix newline (LF) in a Bash script
- What’s the best way to send a signal to all members of a process group?
- How to prevent a background process from being stopped after closing SSH client in Linux
- What’s the magic of “-” (a dash) in command-line parameters?
- What is double dot(..) and single dot(.) in Linux?
- What does the number in parentheses shown after Unix command names in manpages mean?
- How to instruct cron to execute a job every second week?
- How do I use the lines of a file as arguments of a command?
- How to split CSV files as per number of rows specified?
- Using the passwd command from within a shell script
- GROUP BY/SUM from shell
- How to sort strings that contain a common prefix and suffix numerically from Bash?
- linux: kill background task
- In Linux, how to tell how much memory processes are using?
- Why can’t I use Unix Nohup with Bash For-loop?
- How does vi restore terminal content after quitting it?
- How to print third column to last column?
- How to get child process from parent process
- grep without showing path/file:line
- How can I use xargs to copy files that have spaces and quotes in their names?
- Linux: process into a service
- How to set process group of a shell script
- “Max open files” for working process