Created
March 6, 2020 08:46
-
-
Save cweiland/48e50dce8aa859c8d6327ab5a7908fd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
for pid in `lsof +L1 | grep deleted | awk '{print $2}' | uniq` | |
do | |
for fdid in `ls -l /proc/${pid}/fd | grep deleted | awk '{print $9}'` | |
do | |
> "/proc/${pid}/fd/${fdid}" | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Really useful when you have deleted an processlocked file