1 2 3 4 5 6 7 8 9 10
#!/bin/bash for _f in /usr/lib/modules/*tkg*; do if [[ ! -e ${_f}/vmlinuz ]]; then rm -rf "$_f" fi done # vim:set ft=sh sw=2 et: