mirror of
https://github.com/trimstray/the-book-of-secret-knowledge.git
synced 2024-12-18 17:36:14 +00:00
fixed 'readlink -f ...' one-liner
- signed-off-by: trimstray <trimstray@gmail.com>
This commit is contained in:
parent
e311d6dbe2
commit
6c13f0fc5e
11
README.md
11
README.md
@ -2005,12 +2005,15 @@ exec /sbin/init 6
|
|||||||
exec /sbin/init
|
exec /sbin/init
|
||||||
```
|
```
|
||||||
|
|
||||||
###### Get the path of a process
|
###### Show the PID's current working directory
|
||||||
|
|
||||||
|
```bash
|
||||||
|
readlink -f /proc/<PID>/cwd
|
||||||
|
```
|
||||||
|
|
||||||
|
###### Show actual pathname of the executed command
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Alternatives:
|
|
||||||
# - pwdx command
|
|
||||||
# - lsof command
|
|
||||||
readlink -f /proc/<PID>/exe
|
readlink -f /proc/<PID>/exe
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user