Skip to content

Instantly share code, notes, and snippets.

@imam-san
Forked from tobym/gist:3538214
Created March 20, 2018 08:03
Show Gist options
  • Save imam-san/f70444c2b25805bd04b40df946894f18 to your computer and use it in GitHub Desktop.
Save imam-san/f70444c2b25805bd04b40df946894f18 to your computer and use it in GitHub Desktop.
My pwdx implementation for a mac
#!/bin/bash
lsof -a -p $1 -d cwd -n | tail -1 | awk '{print $NF}'
@imam-san
Copy link
Author

sudo lsof -PiTCP -sTCP:LISTEN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment