I'm trying to figure out a way to insert a timestamp into a log file I'm creating for a cron job:
/usr/bin/rsync -v --min-size=1 -rlpgo -O --inplace /home/myuser/Get*
root@xx.x.xx.xx:/mnt/yyy/zzz/compass 2>&1 >& /tmp/rsync_user.log
I've googled this but all I could find are tips on how to add the time and date to the name of the log file itself, not to the contents of the log.
Any tips or pointers would be great.