find's results are perplexing
I am getting different results from the "find" command and some results that are not explained in the man page.
The command I am using should return the files modified in the last 2 days per the man page: find /var -mtime +1 Problem: regardless it returns 19614 lines of output. If I change this to -1, -2, -3 I get 112, 115, and 139 lines of output respectively. The man page does not describe the minus parameters but I suspect that these may in fact be the lines modified in 2, 3, 4 days and there is a typo in the manual. Can someone familiar with this command comment? Thanks |
"find -mtime +1" will return all files with modification times more than 24 hours ago, i.e., everything not modified in the last 24 hours.
The description for the "+" and "-" signs is near the top of the "TESTS" section of the manpage: Numeric arguments can be specified asWhat you want is "-mtime -2" for files modified less than 2*24 hours ago. |
find's results are perplexing
Thanks a bunch that is EXACTLY what I suspected!
I will be checking the man page cuz I read it and it (I thought) was supporting what I had read elsewhere. |
All times are GMT -5. The time now is 04:29 PM. |