December 11, 2003

找出比某檔舊的檔案並刪除

#!/bin/sh
if [ -z $1 ] ; then
echo "Usage: `echo $0` {file}"
else
if [ -f $1 ] ; then
find *tgz \! -newer $1 -exec rm {} \;
else
echo File does not exist.
fi
fi

Posted by pank at December 11, 2003 09:34 AM
Comments
Post a comment













Remember personal info?