Skip to content

Instantly share code, notes, and snippets.

@jim80net
Created March 11, 2014 06:00
Show Gist options
  • Save jim80net/9480308 to your computer and use it in GitHub Desktop.
Save jim80net/9480308 to your computer and use it in GitHub Desktop.
dirty way to truncate deleted file handles
lsof | grep -i deleted | grep REG | grep -v txt | ruby -r 'pp' -e 'STDIN.each do |v| a = v.split(/ +/); puts `:> /proc/#{a[1]}/fd/#{a[3].chop}`; end'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment