Skip to content

Instantly share code, notes, and snippets.

@sify21
Forked from tobym/pwdx_for_mac.bash
Last active September 15, 2021 03:48
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 sify21/331de64a6a5ca9f278f726600b4b7a88 to your computer and use it in GitHub Desktop.
Save sify21/331de64a6a5ca9f278f726600b4b7a88 to your computer and use it in GitHub Desktop.
pwdx for mac. Usage: pwx pid
function pwdx {
lsof -a -d cwd -p $1 -n -Fn | awk '/^n/ {print substr($0,2)}'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment