find中的 time 参数



find手册中对time的解释:
以 atime 为例:

-atime n
       File was last accessed n*24 hours ago. When find figures out how many 24-hours periods ago the file was last accessed, any fractional part is ignored, so to match -atime +1, a file has to have been accessed as least two days ago.

 

 

  n: 当前时刻往前的第 (n + 1) 个24小时
+n: 当前时刻往前,第 (n + 1) 个24小时之前的所有时间
-n: 当前时刻往后,第 n 个24小时之后的所有时间
n 表示一天 24小时的时间长度。

加号表示之前的时间,减号表示之后的时间。



0: 当前时刻往前的第 (1 = 0 + 1) 个 24 小时
1: 当前时刻往前的第 (2 = 1 + 1) 个 24 小时

+0: 当前时刻往前,第 (1 = 0 + 1) 个 24 小时之前的时间
+1: 当前时刻往前,第 (2 = 0 + 2) 个 24 小时之前的时间

-0: 当前时刻往后,第 0 个 24 小时之后的时间,即当前时刻之后的时间
-1: 当前时刻往后,第 1 个 24 小时之后的时间,即当前时刻一天后的时间





下图帮助理解:

 

posted @ 2014-06-20 10:52  goooogs  阅读(592)  评论(0编辑  收藏  举报