How to copy file to sdcard and show progress?

Non release banter
Post Reply
User avatar
Slaxmax
Contributor
Contributor
Posts: 403
Joined: 03 Jan 2013, 09:51
Distribution: KDE4
Location: Campinas Brazil https://goo.gl/yrxwKi

How to copy file to sdcard and show progress?

Post#1 by Slaxmax » 18 Jun 2015, 02:15

How to copy file to sdcard and show progress?

I tried (example)

Code: Select all

rsync -ah --progress /home/guest/test.img /mnt/sdb1/
but not work
the terminal show 100MB/s and exit command without warning.
The file is copied, but I need wait a few minutes to unmount usb reader sdcard
I use KDE4 x64
“DNA is like a computer program but far, far more advanced than any software ever created.”
― Bill Gates, The Road Ahead

donald
Full of knowledge
Full of knowledge
Posts: 1221
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: How to copy file to sdcard and show progress?

Post#2 by donald » 18 Jun 2015, 14:56

What is the size of the "test.img"?
because "--progress" is working fine when I do your rsync command with a ~1GB file.
Small Files may be written to a write cache, before they were actually copied
to the device. (Therefore the "umount" time delay).
If you like to experiment, disable the write cache (if any) with
hdparm -W0 /dev/sdX

User avatar
Slaxmax
Contributor
Contributor
Posts: 403
Joined: 03 Jan 2013, 09:51
Distribution: KDE4
Location: Campinas Brazil https://goo.gl/yrxwKi

Re: How to copy file to sdcard and show progress?

Post#3 by Slaxmax » 18 Jun 2015, 19:58

Really only works with large files.
I tried with a 3GB file, but the transfer starts high ~70MB/s and goes down ~300KB/s and then stabilizes ~4-5MB/s.
cache not activated here
Thanks
“DNA is like a computer program but far, far more advanced than any software ever created.”
― Bill Gates, The Road Ahead

Post Reply