This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ejecting a USB drive using Cygwin (sync)?

Greetings, Ronald Fischer!

> 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.).

Windows device disconnect option syncs the device.
Just find a tool that plays right.

> 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

> assuming that the USB device is on drive E:? The man page of *sync* is a
> bit vague in this respect. Or is there another Cygwin command which can be
> used for this purpose?

There's no "eject" implementation, to my knowledge.
Also, please keep in mind that ejecting drive vs. detaching a device is a
distinctive operation.
I.e. detaching a multi-mode card reader may leave system unable to access
newly inserted cards.

With best regards,
Andrey Repin
Tuesday, January 23, 2018 21:33:21

Sorry for my terrible english...

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]