X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; q=dns; s=default; b=an2psju 2pQoNWSlL+xnvvDoNVADQ4ysBYEplM9gxBASHs+IrW9SrueZ904vuk1v977q46/+ LVyPcSS8uE3jBKhgAb106wnszbMKuWPoG9LHdnk7ELEnFbiYQqy/TwuPmIYhZ1DJ SBMARVXQuW/RUd2KZ183OWEqdjMy+TebKEJQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=default; bh=J7Pzm4Gfupra4 J6ykw9G516Qu/A=; b=LvqbfNSgf0DzPgOCzF7PkscLTT+OKv+f+T0If6JHu67c6 lCPqnDSbcxuWkqIo4f964ljZm760P9WV39EI/XmmjBfgP/su7vj6IOK1LaCcsdNp ivYdUqXLw279lwT3FhZM4hJupO5643Kx45a77x/2WpJGBCRlv0jNwWI9B5RzKU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=fischer, Fischer, perl, schlecht X-HELO: mail-io0-f181.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=u2eK+Yv5TxfVwk2JNk+5tvxNJPk4hLQ2l1Bpv7aDr4k=; b=saNMHuCdhwszBNxQsQIaI4JpMpiJzz74fhGG9T8iEsVil50XaFYhfHaTSothSfYes6 LnD0du0FfQZ/qXpI9iBNQQEDhc3Oyi5zkGxsAZdE8d9m6JjqTAAMldTyst8/FOe4RXcw 5Eu+1WVbyzLIp6b7m36V/BaacQf0bTSYAUoEvkWl1ZlkIxgAVL4aP2MisbR1qCkwxxCj YScPgZSaP+wfRoZJmQJj2JFEg1Im0uY/tJ+8PmXUgYftKmSjwG5kJdj8awhDAKJDE2sI bptvJt8S42j2d560xXNzoRuuIfWIKBoEpR96qEVGqVM9tLybIa7dBiC072e+zMrKpPAR KZiQ== X-Gm-Message-State: AKwxytew97zAw094z7wEbBp3zXLp5ys301OGmMK9hDSIgjlhQAGJ19bd oPc8qpxATFQpEEQBg2TWnXpRp0AcPm0p9v4yqD/qRoLn X-Google-Smtp-Source: AH8x225P2TMHVz/lGIKlEknnqNN/7AxWGiI1GGkxQVUO4i0l/UKQLV+NNkRKUlCw7NkkdDmt9m+Q6YEYHBHQf5asMiA= X-Received: by 10.107.242.14 with SMTP id q14mr3949050ioh.211.1516722084389; Tue, 23 Jan 2018 07:41:24 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1516706057.3270332.1245015392.5FE803A3@webmail.messagingengine.com> References: <1516706057 DOT 3270332 DOT 1245015392 DOT 5FE803A3 AT webmail DOT messagingengine DOT com> From: Nem W Schlecht Date: Tue, 23 Jan 2018 09:41:23 -0600 Message-ID: Subject: Re: Ejecting a USB drive using Cygwin (sync)? To: The Cygwin Mailing List Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes On Tue, Jan 23, 2018 at 5:14 AM, Ronald Fischer 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