Linux 使用mtime查找不';行不通

Linux 使用mtime查找不';行不通,linux,bash,shell,find,Linux,Bash,Shell,Find,我在家里做了一个文件夹,里面有一个文件。现在我正在执行 find /home -mtime 1 但它什么也没找到。这正常吗?您需要使用: find /home -mtime -1 根据人工查找: -mtime n[smhdw] If no units are specified, this primary evaluates to true if the difference between the file last modification time and the t

我在家里做了一个文件夹,里面有一个文件。现在我正在执行

find /home -mtime 1
但它什么也没找到。这正常吗?

您需要使用:

find /home -mtime -1
根据
人工查找

-mtime n[smhdw]
    If no units are specified, this primary evaluates to true if the difference between 
    the file last modification time and the time find was started, rounded up to the next 
    full 24-hour period, is n 24-hour periods.

    If units are specified, this primary evaluates to true if the difference between the 
    file last modification time and the time find was started is exactly n units. 

您必须根据需要将
+
-
添加到整数值中。系统无法理解默认情况下
1
+1

1
表示修改时间正好等于1天,而
+1
表示修改时间大于1天。linux中的1天是根据当前时间的24小时持续时间,而不是根据日期的差异。