#!/bin/bash # This is a mini script called by a cronjob to delete bwlp-entries in /tmp # directory older ~2 days. find /tmp -mtime +2 -name "bwlp-*" -maxdepth 1 -exec rm -rf -- {} \; 2>/dev/null # Same for VM uploads [ -d /srv/openslx/nfs ] && find /srv/openslx/nfs -mtime +2 -type f -name "*.upload.partial" -exec rm -f -- {} \; 2>/dev/null # NFS silly renames [ -d /srv/openslx/nfs ] && find /srv/openslx/nfs -mtime +4 -type f -name ".nfs*" -exec rm -f -- {} \; 2>/dev/null