I want to find out when my log files were compressed by logrotate
because when I received them from cron
in my email, the logs came in as text in the main body of the email instead.
I did:
ls -1la /var/log/some_services
And found that the logs in question are already in the compressed .gz
format. So I was wondering if those files were emailed first, before being compressed.
However, the dates shown are not when the files were compressed, but when the logs were last updated.
How can I tell when a file was compressed?
file
command does not give the date/time when the file was compressed, but the last-modification time of the original file. So, this doesn't answer the question (which IMHO, has no answers as the information is lost / never saved). – vinc17 Jul 8 '14 at 8:46