Unix find -mtime {一个负值或正值} [英] Unix find -mtime {a negative or postive value}

查看:113
本文介绍了Unix find -mtime {一个负值或正值}的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

find -mtime -4find -mtime +4的作用是什么?我无法理解手册页中给出的示例.

What do find -mtime -4 and find -mtime +4 do? I cannot understand the examples given in the man page.

推荐答案

根据手册页:

-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表示严格小于.

The argument to -mtime is interpreted as the number of whole days in the age of the file. -mtime +n means strictly greater than, -mtime -n means strictly less than.

对于您来说,

-4表示少于4天.
+4表示超过4天,即4 * 24小时.

-4 meaning less than 4 days.
+4 meaning more than 4 days i.e. 4*24 hours.

这篇关于Unix find -mtime {一个负值或正值}的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆