On Tue, Jan 23, 2018 at 5:14 AM, Ronald Fischer <yn...@mm.st> wrote: > > I'm looking for a command, which would allow me from a shell script to > prepare the removal of a USB device (stick, external hard drive etc.). With > other words, after issuing the command, I should be able to physically remove > the USB device. > > Can the `sync` command be used, for instance > > sync -f /cygdrive/e >
sync is not quite what you want to do the eject (wouldn't hurt to do so beforehand, but any good 'eject' program will do a sync for you). There are several solutions listed here: https://superuser.com/questions/443162/remove-usb-device-from-command-line RemoveDrive and devcon look like the best bets for what you're looking for. -- Nem W Schlecht "Perl did the magic. I just waved the wand." -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple