shell命令中find的用法

shell命令中find的用法

find $current_dir/log/ServiceMainBody_log -name “output*” -mtime +10 -exec rm {} \;**

-name filename #查找名为filename的文件
-exec: #find命令对匹配的文件执行该参数所给出的shell命令
-mtime -n +n: #按文件更改时间来查找文件,-n指n天以内,+n指n天以前
-atime -n +n: #按文件访问时间来查找文件
-ctime -n +n: #按文件创建时间来查找文件*

posted @ 2021-06-23 14:01  聪明的大嘴花  阅读(297)  评论(0编辑  收藏  举报