#!/bin/sh while true do echo -n "now start remove old file!" find /COMTRADE -mtime +180 -type f -exec rm -f {} \; sleep 604800 done