#!/bin/bash
find
${path:-/tmp}
-name
"*.tar.gz"
-type
f mtime
+
7
| xargs
rm
-f
# find
为查找文件命令
# ${path:-/tmp}
:表示如果没有定义
path
则使用
/tmp
替代
# find
不支持
|
使用
xargs
命令表示管道符进行数据转换