Script
Hi,
I once wanted exactly the same thing.
The shell script I made worked as follows.
Use the two arguments given while coping to understand what is copied to where.
cp source destination &
Use du command to find the file size of the source. Multiply that value with 10/100 (Or what ever step size you want). Construct an while condition (till size of destination is less than source) to do the following.
Check the size of the destination using du command,
if it is more than i*(SourceSize*10/100) { where i iterates from 0 to 10}
print "i*10% completed", and increment i
sleep for some time.
Close while loop.
Thats all. I hope I am clear.
I shall try to find out the script I used, It is somewhere lost in backups. But the real fun is actually writing the shell script yourself. Define an alias also for this script (say alias ccp="your_cool_copy.sh")
-Cheers
indiajoe
|