我有一个工作脚本:
#!/bin/bash
find ~/.backups/ -type f -name '*.tgz' -mtime +0.5 -exec rm {} \;
没有错。只是想知道-mtime是什么以及它是如何计算的。似乎无法在Google上大获成功。
答案 0 :(得分:1)
来自man find
:
-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.