#!/bin/bash
#####################
#
#This is a auto del file when that is old then 7 days
#
####################
#
#load PATH
#
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
####################
#
#Program :
#
###################
#setting doc
doc=/tmp/
#setting search data type
# b block (buffered) special
# c character (unbuffered) special
# d directory
# p named pipe (FIFO)
# f regular file
# l symbolic link
# s socket
# D door (Solaris)
datatype="f"
#setting days that how long before
day="7"
#
find $doc -type $datatype -mtime +$day -exec rm {} \;
#############
- Apr 11 Wed 2007 03:01
定時刪檔SHELL
全站熱搜
留言列表