for all deleted … kill all processes

Got my / file system full, after checking all, as last resort I looked at lsof to check are there some deleted files which are still hold by some process, and yes, there were many of them!
Sometimes simple for loop can save a lot of time…
# for m in $(lsof | grep delete |awk '{print $2}');do kill -9 $m;done

Advertisements

#lsof