将 /opt/test下以“.log”结尾的文件列出
# find /opt/test -type f -name "*.log" -exec ls -l {} \;
将 /opt/test下目录权限(包括/opt/test)全部跟改为750
# find /opt/test/ -type d -exec chmod 750 {} \;
将 /opt/test下目录权限(不包括/opt/test)全部跟改为750
# find /opt/test/ -type d -exec chmod 750 {} \;
仅将/opt/test 这一层目录下的类型为文件的删除
# find /opt/test -maxdepth 1 -type f -exec rm -rf {} \;
从根下 第二层到第五层目录下名为"passwsd"的文件
# find / -mindepth 2 -maxdepth 5 -type f -name "passwd" -exec ls -l {} \;
将/opt/test 目录下修改时间为7天前的类型为文件的删除
# find /opt/test -mtime +7 -type f -name "\*" -exec rm -rf {} \;
将/opt/test访问时间为最近十分钟的文件删除
# find /opt/test -amin -10 -type f -name "\*" -exec rm -rf {} \;
将/opt/test下文件大小大于10M的文件列出
# find /opt/test -size +10M -type f -name "\*" -exec ls -l {} \;