#!/bin/csh
# to remove files more than 30 days from directory /delete_tmp_dir
#find /delete_tmp_dir -mtime +30 -print -exec rm -f {} \;
#find /delete_tmp_dir -type d -print -exec rmdir {} \;
# /delete_tmp_dir¿¡¼ 10ÀÏ ÀÌ»óµÈ ÆÄÀÏÀ» »èÁ¦
find /delete_tmp_dir -mtime +10 -print -exec rm -f {} \;
# /delete_tmp_dir¿¡¼ 31ÀÏ ÀÌ»óµÈ ÆÄÀÏÀ» »èÁ¦
find /delete_tmp_dir -mtime +31 -print -exec rm -f {} \;
# /delete_tmp_dir/old_dir¿¡ ÀÖ´Â ³»¿ëÁß 0ÀÏ µÈ µ¥ÀÌŸ¸¦ /delete_tmp_dir/new_dir¿¡ move
find /delete_tmp_dir/old_dir -mtime +0 -print -exec mv {} /delete_tmp_dir/new_dir \;