1 shell脚本如下
find /logs -type f -ctime +30 | xargs rm -rf (这里实现了删除30天之前文件的命令)
find ./ -size +50M 显示当前路径下,大于50M的文件。(包含子文件夹内的文件)
find ./ -size +50M -exec rm {} \; 删除当前路径下,大于50M的文件。(包含子文件夹内的文件)
find ./app/ -size +20M -type f |grep trc|xargs ls -lrth
find /logs -type f -ctime +30 | xargs rm -rf (这里实现了删除30天之前文件的命令)
find ./ -size +50M 显示当前路径下,大于50M的文件。(包含子文件夹内的文件)
find ./ -size +50M -exec rm {} \; 删除当前路径下,大于50M的文件。(包含子文件夹内的文件)
find ./app/ -size +20M -type f |grep trc|xargs ls -lrth