"find -mtime": 1,782 /etc files over 250 years old!?
"Find" produces 1,782 /etc files last modified over 250 years ago,
/usr/bin/find /etc -mtime +100000 -printf '%Tc %p\n' |wc
If you remove "|wc", you will see that none of these files
was modified before 1998.
I notice this same -mtime bug with GNU "find"
on Debian Linux (woody distribution),
on Debian Linux (potato distribution), and
on AIX,
but NOT with IBM's own (non-GNU) "find" on AIX version 4.3.
So, this appears to be the upstream author's problem
that has existed for at least 3 years.
Seeking more understanding, one can run the bash script
at the end of this email.
Using that, here is the the number of "Files-found" in /etc
with a name having the string "host"
that were last modified over "Days" ago
[Files-found should never increase with increasing -mtime days].
Days Files-found
1 30
10 30
100 30
1000 6
10000 0
100000 24 <--OVER 250 YEARS OLD
1000000 0
10000000 0
100000000 0
I include the upstream email address bug-findutils@gnu.org
in the "To:" address so that they might fix this problem/bug
[I was too lazy to look at the source code].
~~~Script used:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf ' Days Files-found\n'
for DAYS in $(cat <<+++
1
10
100
1000
10000
100000
1000000
10000000
100000000
+++
)
do
printf '%10s' $DAYS
/usr/bin/find /etc -name '*host*' -mtime +$DAYS |wc -l
done
--
Jameson C. Burt, NJ9L Fairfax, Virginia, USA
jameson@coost.com http://www.coost.com
(202) 690-0380 (work)
Reply to: