This is something rather special, but I bet you can help me out.
I'm working in an environment where many logfiles are generated and rotated, mainly from java-services runnning. As we are performing L&P tests on that environment, we often have the system generated more files, than are kept by logrotation. I now need a way to archive the rotated logs before they are deleted, to be able to have all logs generated during the test.
But I do not have the permissions to change the logrotation in any way, so I have to do it with bash and basic UNIX tools. Additionally, since it is Load-, and Performance tests the solution needs an absolutely small footprint regarding CPU and Memory usage.
First I considered using a hash like sha1sum to keep the hash and save all files that have altered, but generating and checking the hash seems somewhat time and CPU consuming.
This question is not necessarily about real code, but about a concept - although a code example would be very welcome.