# # VMWare cleanup # # Unmount dirs that vmware sometimes leaves around VMWARE_TMP_DIRS="$(df -P | grep -oE '/tmp/vmware-.*$')" for DIR in $VMWARE_TMP_DIRS; do umount "$DIR" && rmdir "$DIR" done # Delete redo/temp files that sometimes stay around e.g. on vmware crash for file in $(find /tmp/virt/vmware -type f -size +4M); do fuser -s "$file" || rm -- "$file" done true