Re: [LAD] [OT] bash vs disk activity

From: Dirk Jagdmann <doj@email-addr-hidden>
Date: Thu Oct 11 2007 - 16:41:40 EEST

Hello Patrick,

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

The only reliable way on unix to ensure all data has been written to the
disk is to umount it. The "sync" (API call or program) is merely a hint
to flush filesystem buffers at the point where the call was made, but
one second later, while the sync is still running, new dirty buffers
might be generated. So you should use something along the following:

time ( mount /dev/xxx /mnt/yyy ; cp -a /whatever /mnt/yyy ; umount
/mnt/yyy )

-- 
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Thu Oct 11 20:15:02 2007

This archive was generated by hypermail 2.1.8 : Thu Oct 11 2007 - 20:15:02 EEST