Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unix find-mtime{负值或正值}_Unix_Gnu Findutils - Fatal编程技术网

Unix find-mtime{负值或正值}

Unix find-mtime{负值或正值},unix,gnu-findutils,Unix,Gnu Findutils,find-mtime-4和find-mtime+4做什么?我无法理解手册页中给出的示例。嗯,我可以 文件的数据上次修改是在n*24小时前。请参阅-atime的注释,了解舍入如何影响文件修改时间的解释 根据手册页: -mtime n File’s data was last modified n*24 hours ago. See the comments for -atime to understand how rounding affects the interpretat

find-mtime-4
find-mtime+4
做什么?我无法理解手册页中给出的示例。

嗯,我可以

文件的数据上次修改是在n*24小时前。请参阅
-atime
的注释,了解舍入如何影响文件修改时间的解释

根据手册页:

-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
的参数被解释为文件期限内的天数
-mtime+n
表示严格大于,
-mtime-n
表示严格小于

所以在你的情况下

-4
表示少于4天。

+4
意味着超过4天,即4*24小时。

我的搜索——无论是“否定”、“mtime”还是“严格”搜索——都没有在手册页中找到规范性文本,但它在那里,oy,四分之一是通过:

   Numeric arguments can be specified as

   +n     for greater than n,

   -n     for less than n,

   n      for exactly n.

但是,当Google的头号对手是Stack Overflow,@SMA和@Wgitcht已经给出了正确答案时,谁还需要这个手册页呢?好吧,很高兴知道这是法律上的,不是一次愉快的事故。

谢谢你的解决方案!但我知道这件事。我想知道如果我给了任何负值,那它意味着什么?不!我用过,找过-mtime-4&查找-mtime+4。他们给出了不同的结果。你是绝对正确的,抱歉,谢谢你这么长时间后纠正我。谢谢!我得到了答案!
-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.
   Numeric arguments can be specified as

   +n     for greater than n,

   -n     for less than n,

   n      for exactly n.