find command
-type
:file type-name
:file name-mtime
: File modification time-days-mmin
:minuteperm
: File attributes-size
:File size
Examples:
1. Find /data/
the directory 7
days ago and is larger than the size of 100M
the file
#查找
find /data -type f -mtime +7 -size +100M
#查找并删除
find /data -type f -mtime +7 -size +100M -exec rm -rf {
} \;
2. Find files generated within 15 minutes
find /data -type f -mmin -15