Re: get the timestamp as a log filename

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

 



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



----- Original Message ----- 
From: "Alexander Dalloz" <alexander.dalloz@xxxxxxxxxxxxxxxx>
To: <fedora-list@xxxxxxxxxx>
Sent: Thursday, January 22, 2004 1:50 PM
Subject: Re: get the timestamp as a log filename


> Am Do, den 22.01.2004 schrieb Genti A. Hila um 18:29:
> > Does anyone know to get the timestamp as the name of log files instead
of just the name and some numbers after it ?
> > I am thinking to keep hourly log files for PIX and for a month would be
really a lot of work to find out when a certain file was created.
> >
> > Thanks in advance
>
> cp -a file.log intrusion-`date +"%Y.%m.%d_%X"`.log && > file.log
>
> For other formats of date see "date --help".
>
> Alexander
>
>
> -- 
> Alexander Dalloz | Enger, Germany
> PGP key valid: made 13.07.1999
> PGP fingerprint: 2307 88FD 2D41 038E 7416  14CD E197 6E88 ED69 5653
>
>
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>




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

  Powered by Linux