Anatoly Kern wrote, On 05/24/2011 09:53 AM:
> you can run "time /backupscript" from cron to see elapsed time without
> manual comparison.
>
> On Tue, May 24, 2011, Roger Searle<[email protected]> wrote:
>> I'm interested in knowing how long each user's backing up takes
That would work to time the length of the whole script, but Roger is
interested in the length of each sub-task.
If you're averse to using the time command, then calculate the length of
each backup yourself.
#!/bin/tcsh
foreach username ( roger bruce mary fred )
setenv t1 `date +%s`
## Do funky backup command here, eg
## rsync -uvH --delete /home/$username roger@s3cloud:/$username
echo -n "Backup for $username took "
echo `date +%s`-$t1 | bc
end
--
Craig Falconer
_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users