Skip to content

Instantly share code, notes, and snippets.

@cybort
Forked from wilvk/kill_open_files.sh
Created July 2, 2021 09:12
Show Gist options
  • Save cybort/c29e81b9a0a446a1f58ed0e7418f9b08 to your computer and use it in GitHub Desktop.
Save cybort/c29e81b9a0a446a1f58ed0e7418f9b08 to your computer and use it in GitHub Desktop.
Linux - Kill all processes of deleted files that are still open
#!/bin/bash
lsof|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