I have a script that creates a backup for me. I would like to keep track of its progress, so I would like to see, every second (or so), the time elapsed and the size of the backup file. I manage to get the size of the backup file, but I cannot get the elapsed time to work.
This is what i have:
1. To create the backup:
every 1 sys_echosize $tarfile &
tar cfz $tarfile .
2. The "every" script performs a cmd every few seconds:
while true ; do
3. The "sys_echosize" is as follows:
echo -e -n " " `du -h $1` "\r"
Nice, isn't it?!?
But not finished, as I would like to have the time elapsed of the tar command...
Any help would be appreciated!!!