Skip to content

Instantly share code, notes, and snippets.

@benshimmin
Created March 7, 2012 12:05
Show Gist options
  • Save benshimmin/1992745 to your computer and use it in GitHub Desktop.
Save benshimmin/1992745 to your computer and use it in GitHub Desktop.
Kill a process which is accessing a file (whose name matches FILENAME) - use with caution!
lsof | grep FILENAME | kill -9 `awk '{print $2}'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment