[CentOS] add time to log file for cron job

Tim Dunphy bluethundr at gmail.com
Sat May 24 03:47:07 UTC 2014


Guys,

This is what worked

[root at uszmpwsld011 ~]# /usr/bin/rsync -v --min-size=1 -rlpgo -O --inplace
/home/compassfeeduser/Get* root at xx.xx.xx:/mnt/bravotv/media/compass | ts
 2>&1 >& debug.txt

[root at uszmpwsld011 ~]# cat debug.txt
May 23 23:44:49 sending incremental file list
May 23 23:44:49
May 23 23:44:49 sent 67 bytes  received 12 bytes  158.00 bytes/sec
May 23 23:44:49 total size is 0  speedup is 0.00

Thanks to Karl who provided this.
Tim


On Fri, May 23, 2014 at 10:32 PM, Frank Cox <theatre at melvilletheatre.com>wrote:

> > I'm trying to figure out a way to insert a timestamp into a log file I'm
> > creating for a cron job I'm setting up:
>
> Why not make your rsync command into the second line of a script, and make
> the first line of the script write the time to the log.
>
> --
> MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B



More information about the CentOS mailing list