查找指定目錄下,60天以前的文件:
find /mnt/xml_data -mtime +60 -name "*.xml".net
找到並統計數量:
find /mnt/xml_data -mtime +60 -name "*.xml" -exec ls -l {} \; | grep "^-" | wc -lxml
找到而且刪除:
find /mnt/xml_data -mtime +60 -name "*.xml" -exec rm -rf {} \;blog
-atime,-ctime,-mtime的具體含義:grep
https://blog.csdn.net/Li_Ning_/article/details/51468980im
https://blog.csdn.net/GGxiaobai/article/details/53609478統計
https://blog.csdn.net/wodeqingtian1234/article/details/53975744文件