I'm looking at the files under /var/log on CentOS 7... And many of the files have dates included in their names (i.e. secure-20190512)... but the date in their names don't correspond to either the last message written to them... or their modification date... Which in the example of the secure-20190512 file were both May 10th... But the change date the stat command gives does correspond to May 12th

Can someone explain what's going on here? If the file was created and last written too on May 10th... Why does it have a May 12th date in it's name?



Assuming it's the log rotation facility that renames the file to include the date in the filename, one way this could happen if no data whatsoever was actually written to the file between the 10th and when it was rotated, on the 12th.

The 12th of May 2019 was a Sunday, and weekly logfile rotations would typically happen on Sundays. The 10th of May 2019 was a Friday, and if the system was unused during the Saturday, no data may have been written to the log before it was rotated on Sunday (probably around midnight between Saturday and Sunday).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.