Re: add time to log file for cron job

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Guys,

This is what worked

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

[root@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@xxxxxxxxxxxxxxxxxxx>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@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux