It seems not to work. I would copy once a minute the messages file and delete it.
If you want to apply the data to the name of the file I tried, unsuccessfully, to use the command "date."
Thank you.
Joined: 26 Mar 2013 Posts: 1857 Location: Hung Hom, Hong Kong
Posted: Fri Sep 15, 2017 15:04 Post subject: Re: Copy the messages file via cron
Frakko wrote:
....
1 * * * * * root cp /var/log/messages /mnt/sda1/messages_"% date"
....
If you want to apply the data to the name of the file I tried, unsuccessfully, to use the command "date."
Thank you.
You should have "`" (next to <1>) instead of '"'! "``" executes a command. "xxx" just represents a string.