linux根據時間判斷刪除多餘舊的文件

#!/bin/bash dir='/opt/zhangsan/upload/' file='expe*'        #這裏須要匹配的文件名,若是匹配全部,直接填* filenumber=6    #要保留的文件個數 while [ 1 ]; do     count=0;     eval ls -t ${dir}/${file} 2>/dev/null | while read onefil
相關文章
相關標籤/搜索