find -mtime -4和find -mtime +4是做什么的?我无法理解手册中给出的例子。
发布于 2014-12-30 07:06:51
根据手册页:
-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小时。
发布于 2014-12-30 07:01:17
嗯,我可以。
-mtime n 文件的数据上一次修改是在24小时前。请参阅
-atime的注释,以了解舍入如何影响文件修改时间的解释
find . -mtime 0 # find files modified between now and 1 day ago
# (i.e., within the past 24 hours)
find . -mtime -1 # find files modified less than 1 day ago
# (i.e., within the past 24 hours, as before)
find . -mtime 1 # find files modified between 24 and 48 hours ago
find . -mtime +1 # find files modified more than 48 hours ago发布于 2020-11-06 16:55:03
我的搜索--不管是“否定”、“时间”、“严格”--都没有在手册页找到规范文本,但它就在那里,oy,一刻不停:
Numeric arguments can be specified as
+n for greater than n,
-n for less than n,
n for exactly n.但是,当谷歌的头号竞争对手是堆栈溢出时,谁需要这个手册页呢?@SMA和@wgitscht已经给出了正确的答案。好吧,很高兴知道这是法律上的,而不是一个愉快的意外。
https://stackoverflow.com/questions/27700943
复制相似问题