[LAD] [OT] bash vs disk activity

Patrick Shirkey pshirkey at boosthardware.com
Tue Oct 9 10:50:12 UTC 2007


Does anyone here have a bash script that will monitor disk activity or
accurately provide a progress bar of a simple file copy?

I have a script that transfers data to a usb device using 

cp -a /xxx /usb_device & 

But it falls over with reporting back the actual amount of data that has
been transferred. It seems that the copy command doesn't return the
actual amount transferred to disk but more the amount it has queued to

For example if I transfer 200mb to a usb disk the copy command takes
about 30 seconds before it returns and the data takes about 5 minutes
before it is actually finished being transferred and the device is

How would I track the 5 minutes of data transfer with bash?


Patrick Shirkey
Boost Hardware Ltd.

More information about the Linux-audio-dev mailing list