Re: get the timestamp as a log filename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Genti A. Hila wrote:
I think I didn't explain it quite well:
I have some log files that are saved from logrotate  hourly.
But what i get is something like message.1 messages.2 etc
Instead of this i would like to have something like
mesagges_04\01\21_14\00
messages_04\01\21_13\00
So to follow the format  messages_yy\mm\dd\_hour\minute
Something like that, the idea is to have the time as the name of the file


Genti


You may have to write a script to run as part of the logrotate configuration. There is an ability to have a script execute after the rotation.

There are different ways of calling the script.

I am not sure if the "extension" will work for what you want.

Maybe this would be better as a cron feature than logrotate as it sounds that you want to keep a running record of log files, not just rotate them.

--
Robin Laing




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux