unix – “find command -mtime 0”没有得到我期望的文件

我试图找到一个0天的文件.以下是我为测试它而执行的步骤
$ls
$ls -ltr
total 0
$touch tmp.txt
$ls -ltr
total 0
-rw-r-----   1 tstUser tstUser           0 Feb 28 20:02 tmp.txt
$find * -mtime 0
$
$find * -mtime -1
tmp.txt
$

为什么’-mtime 0’没有给我这个文件

‘-mtime 0’和’-mtime -1’之间的确切区别是什么?

我确定必须有其他方法可以在unix中找到0天的文件,但我很好奇这个’-mtime’实际上是如何工作的.

-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.

因此,-mtime 0将等于:“文件的数据是在0小时前修改的.
虽然-mtime 1将是:“文件的数据最后修改时间为24小时前”

编辑:

Numeric arguments can be specified as

   +n     for greater than n,-n     for less than n,n      for exactly n.

所以我猜-1会在过去24小时内被修改,而1则恰好是一天.

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...