Ubuntu: Can I suppress the last-minute 'writing to disk' dialogue when umounting? (bash script)


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?


Run the sync command before unmounting.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »