get the timestamp as a log filename

Alexander Dalloz alexander.dalloz at uni-bielefeld.de
Thu Jan 22 18:50:48 UTC 2004


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





More information about the fedora-list mailing list