1

I was studying the command find, and I saw:

-cmin n
              File's status was last changed n minutes ago.
-ctime n
              File's status was last changed n*24 hours ago.

but when n is zero, comes the difference, is there a sound explanation for this behavior?

$ date
Thu 23 Jul 2020 02:16:17 PM CST
$ 
$ touch a 
$ find -name a -cmin 0
$ find -name a -cmin 1
./a
$ find -name a -ctime 0
./a
$ find -name a -ctime 1
$ 
$ date
Thu 23 Jul 2020 02:16:18 PM CST
$ 
oguz ismail
  • 1
  • 16
  • 47
  • 69
joker
  • 11
  • 2
  • Find results seems correct to me. – Alice Oualouest Jul 23 '20 at 06:22
  • Welcome to Stack Overflow! [so] is for programming questions, not questions about using or configuring Unix and its utilities. [unix.se] or [su] would be better places for questions like this. – Barmar Jul 23 '20 at 06:26
  • The `-ctime` granularity is a whole day. So when you use `-ctime 0` it means any time from 0 days ago to 0.99999 days ago, and `-ctime 1` means from 1 day ago to 1.99999 days ago. – Barmar Jul 23 '20 at 06:27
  • 1
    thank you for your guide, and i can understand the ctime , however similarly the cmin 0 shoud means 0 mins ago to 0.999 mins ago,but it doesn't – joker Jul 23 '20 at 06:33

0 Answers0