[ 原始碼: extrace ]
套件:extrace(0.7-2)
trace exec() calls system-wide
extrace traces all program executions happening on a system, or the subset of program executions done by a given process and its descendants. For example, to see what the shell really executes:
$ sudo extrace -p $(pidof zsh) 8505 git rev-parse --is-inside-work-tree 8506 direnv export zsh 8511 git rev-parse --is-inside-work-tree
8515 wc -l 8516 whoami8542 hostname 8543 git rev-parse --is-inside-work-tree 8544 direnv export zsh
8549 /bin/bash --noprofile --norc -c 'eval "$("/usr/bin/direnv" stdlib)" >&2\ && source_env ".envrc" >&2 && "/usr/bin/direnv" dump' 8551 /usr/bin/direnv stdlib 8558 /usr/bin/direnv watch .envrc 8565 dirname .envrc 8567 basename .envrc 8569 basename .envrc 8549 /usr/bin/direnv dump8574 git rev-parse --is-inside-work-tree
8578 wc -l 8579 whoami