Monitor for file transfer to be done

I used this script once when I transfered a music directory to another computer with scp. I ran the script on the receiving computer. It assumed the stuff would go into ~/Music/MyDir.

#!/bin/bash

lastsize=`du -sk ~/Music/MyDir`

sleep 15

cursize=`du -sk ~/Music/MyDir`
echo $cursize

while [ "$lastsize" != "$cursize" ]; do
        lastsize=`du -sk ~/Music/MyDir`

        sleep 15

        cursize=`du -sk ~/Music/MyDir`
        echo $cursize
done

echo "It's all done"

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.