用mtime查找不起作用

时间:2014-10-25 11:44:44

标签: linux bash shell find

我在家里制作了一个文件夹,我触摸了里面的文件。现在我正在执行

find /home -mtime 1

但它没有找到任何东西。这是正常的吗?

2 个答案:

答案 0 :(得分:2)

您需要使用:

find /home -mtime -1

根据man find

-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 :(得分:0)

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