# # VMWare cleanup # # Unmount dirs that vmware sometimes leaves around VMWARE_TMP_DIRS="$(cat /proc/mounts | grep "/tmp/vmware-" | awk -F " " '{print $1}')" 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