Skip to content

Instantly share code, notes, and snippets.

@azat
Created May 4, 2014 18:10
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 azat/d0cee22b102ae696135c to your computer and use it in GitHub Desktop.
Save azat/d0cee22b102ae696135c to your computer and use it in GitHub Desktop.
lsof -n | awk '{ i = 1; i += !!index($0, "deleted"); i += !!index($0, "TCP"); printf "%i: ", i; for (j = 0; j < i; ++j) { printf "%s ", $(NF-j) }; printf "\n"; }' | less
@azat
Copy link
Author

azat commented May 4, 2014

Or lsof -Fp

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