find . -type f -mtime +7 -delete
. 查找当前目录
-type f 查找某一类型的文件 b 块设备文件 d 目录 c 字符设备文件 p 管道文件 l 符号链接文件 f 普通文件
-mtime 查找系统最后n*24小时被改变文件数据的文件
-delete find的action参数,支持n多,具体查看find --help
find . -type f -mtime +7 -delete
. 查找当前目录
-type f 查找某一类型的文件 b 块设备文件 d 目录 c 字符设备文件 p 管道文件 l 符号链接文件 f 普通文件
-mtime 查找系统最后n*24小时被改变文件数据的文件
-delete find的action参数,支持n多,具体查看find --help