Re: get the timestamp as a log filename

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

 



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




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

  Powered by Linux