I am setting up rsync cron to run every hour to sync up 2 servers. My question is how do I make the log file name that it is saving to in the format log_file-{Year}-{Month}-{Date}.log
with the year, month, and date changing accordingly?
Thanks in advance.
Best Answer
I assume you're using
--log-file
? Then you can do something like this:Or, in a single line if you're putting this directly in your crontab: