Skip to content

Instantly share code, notes, and snippets.

@czpython
Created May 18, 2014 06:03
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 czpython/a21ac2fc3bb544eb6ece to your computer and use it in GitHub Desktop.
Save czpython/a21ac2fc3bb544eb6ece to your computer and use it in GitHub Desktop.
Kill processes using deleted files. This frees up memory used by files that were unlinked but are kept open by a process.
lsof +L1 | grep 'deleted' | awk '{print $2}' | xargs kill -9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment