查找指定目录下,60天之前的文件:
find /mnt/xml_data -mtime +60 -name "*.xml"
找到并统计数量:
find /mnt/xml_data -mtime +60 -name "*.xml" -exec ls -l {} \; | grep "^-" | wc -l
找到并且删除:
find /mnt/xml_data -mtime +60 -name "*.xml" -exec rm -rf {} \;
-atime,-ctime,-mtime的具体含义:
https://blog.csdn.net/Li_Ning_/article/details/51468980
https://blog.csdn.net/GGxiaobai/article/details/53609478
https://blog.csdn.net/wodeqingtian1234/article/details/53975744