Skip to content

Instantly share code, notes, and snippets.

@jalex19100
Created October 9, 2018 14:12
Show Gist options
  • Select an option

  • Save jalex19100/09a756e0fcf0825e7a9dbfac02df9f3c to your computer and use it in GitHub Desktop.

Select an option

Save jalex19100/09a756e0fcf0825e7a9dbfac02df9f3c to your computer and use it in GitHub Desktop.
List open file count for all processes by PID
for i in `ps ax| cut -f1 -d\ |sort |uniq`;do echo -n "$i "; lsof -p $i|wc -l; done| sort -k 2
@jalex19100
Copy link
Author

Mac

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