Shell & progress bar

I want to use the copy method from shell with updated progress bar…
Is there any example shell + progress bar update,or someone can give me a step by step how to do?

does copy command in terminal give progress information?

if you use MBS Plugin, you can check those two classes:


and MacFileOperationMBS

No. Neither does CopyFileTo in Xojo.

The only way in pure Xojo would be to use a couple binarystreams so Position would drive the progressBar.

or the two classes above…

Yes, with EventProgress.

Since the question was about using shell, I did not dare chiming in too early.

you can use rsync --progress


The Reason i want to use the shell is because i make a new dmg file with HDIUTIL and then i mount the volume as -nobrowse (hide the mounted volume from finder).
So the only available commands for me is (cp,rsync and ditto)

scp? There is percentage progress.

scp copies files between hosts on a network.
It uses ssh(1) for data transfer, and uses the same authentication and provides the same security as ssh(1).
Unlike rcp, scp will ask for passwords or passphrases if they are needed for authentication.
For now i use the rsync like Axel provide.

[quote=253156:@Axel Schneider]you can use rsync --progress

Axel from the example is see the

output = right(NthField(Me.ReadAll, "% ", 1), 3)

from my terminal i get this result 22532 100% 0.00kB/s 0:00:00 (xfer#1, to-check=1084/1086)
So i guess u get the 100% to proceed in the next line?
Is possible to get And the 1084/1086 down file count to fld?

it seems that ‘to-chk’ will appear only at the end of the process, , not during the copying.

Axel is appear in every file that have copied.

rsync -a --progress /Users/ioannis/Downloads/OLD-1 /Users/ioannis/Documents/folderTest building file list ... 1086 files to consider OLD-1/ OLD-1/.test1 22532 100% 0.00kB/s 0:00:00 (xfer#1, to-check=1084/1086) OLD-1/test2 55637 100% 53.06MB/s 0:00:00 (xfer#2, to-check=1083/1086) OLD-1/test3 5636 100% 2.69MB/s 0:00:00 (xfer#3, to-check=1082/1086) OLD-1/test4 24963 100% 7.94MB/s 0:00:00 (xfer#4, to-check=1081/1086) OLD-1/test5 31510 100% 7.51MB/s 0:00:00 (xfer#5, to-check=1080/1086) OLD-1/test6 613408 100% 53.18MB/s 0:00:00 (xfer#6, to-check=1079/1086) OLD-1/test7 6290384 100% 79.99MB/s 0:00:00 (xfer#7, to-check=1078/1086) OLD-1/test8 21045526 100% 62.33MB/s 0:00:00 (xfer#8, to-check=1077/1086) OLD-1/test9 2662429 100% 6.99MB/s 0:00:00 (xfer#9, to-check=1076/1086) OLD-1/test10 59424 100% 158.56kB/s 0:00:00 (xfer#10, to-check=1075/1086)

end when the copying done the final result is

sent 1843212437 bytes received 20936 bytes 81921483.24 bytes/sec total size is 1842917834 speedup is 1.00

NthField(NthField(output,“to-check=”, 2),") ", 1)