#!/bin/bash while true; do find /tmp -type f -atime +2 -delete find /tmp -type d -empty -delete sleep 1d done