Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a bash script that will copy files over to drives upon insertion and then unmount. The actual copy line is simple:


and the umount:

umount $DRIVE

However, once cp is done and umount is presented, the filesystem still has to finish the job and I'm presented with this:


Now, this script for when I need to copy the same files to around 500 usb drives via a 10 usb hub. I already have my own way to notify me which drive needs to be ejected when, and having a million popup windows is very annoying. Apart from sending a 'sleep 5s' command (which really wouldn't be too bad), is there a way that I can suppress these messages?

share|improve this question
up vote 1 down vote accepted

Run the sync command before unmounting.

share|improve this answer
Bless you, good sir. :) – user6658 May 14 '12 at 21:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.