find $dataBackupDir -name "mysql_*.gz" -type f -mtime +2 -exec rm {} \; > /dev/null 2>&1这里面什么命令是删除2个月前的备份文件的?

解决方案 »

  1.   

    -mtime +2-mtime n
                  File’s  data was last modified n*24 hours ago.  See the comments
                  for -atime to understand how rounding affects the interpretation
                  of file modification times.
      

  2.   

    find $dataBackupDir -name "mysql_*.gz" -type f -mtime +2 -exec rm {} \; > /dev/null 2>&1红包部分是删除。这些你可以在LINUX的 MAN中查看相关语法。