From: Nem W Schlecht <nem@emptec.com>
To: The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: Ejecting a USB drive using Cygwin (sync)?
Date: Tue, 23 Jan 2018 15:41:00 -0000 [thread overview]
Message-ID: <CA+2x6-+9qXwgR8QUYUzHZZdtJaez42tT1MATVnDyNoR49uAjvQ@mail.gmail.com> (raw)
In-Reply-To: <1516706057.3270332.1245015392.5FE803A3@webmail.messagingengine.com>
On Tue, Jan 23, 2018 at 5:14 AM, Ronald Fischer <ynnor@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
next prev parent reply other threads:[~2018-01-23 15:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 11:14 Ronald Fischer
2018-01-23 15:41 ` Nem W Schlecht [this message]
2018-01-23 18:50 ` Andrey Repin
2018-01-23 21:13 ` Brian Inglis
2018-01-23 23:36 ` Steven Penny
2018-01-25 3:02 ` Brian Inglis
2018-01-25 9:58 ` David Allsopp
2018-01-25 20:37 ` Brian Inglis
2018-01-25 21:43 ` Doug Henderson
2018-01-26 1:31 ` Brian Inglis
2018-01-25 12:45 ` Marco Atzeri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+2x6-+9qXwgR8QUYUzHZZdtJaez42tT1MATVnDyNoR49uAjvQ@mail.gmail.com \
--to=nem@emptec.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).