From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84595 invoked by alias); 23 Jan 2018 18:50:08 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 84570 invoked by uid 89); 23 Jan 2018 18:50:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=BAYES_20,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=plays, H*F:D*yandex.ru, fischer, Fischer X-HELO: forward101p.mail.yandex.net Received: from forward101p.mail.yandex.net (HELO forward101p.mail.yandex.net) (77.88.28.101) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Jan 2018 18:50:05 +0000 Received: from mxback18j.mail.yandex.net (mxback18j.mail.yandex.net [IPv6:2a02:6b8:0:1619::94]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 4AC956A83F3B; Tue, 23 Jan 2018 21:50:02 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback18j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id doejWk1UwU-o2xCXTYH; Tue, 23 Jan 2018 21:50:02 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id T9vi7Dnbm7-o1dSLWpo; Tue, 23 Jan 2018 21:50:01 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Authentication-Results: smtp3p.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Tue, 23 Jan 2018 18:41:56 -0000 Date: Tue, 23 Jan 2018 18:50:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <383708668.20180123214156@yandex.ru> To: Ronald Fischer , cygwin@cygwin.com Subject: Re: Ejecting a USB drive using Cygwin (sync)? In-Reply-To: <1516706057.3270332.1245015392.5FE803A3@webmail.messagingengine.com> References: <1516706057.3270332.1245015392.5FE803A3@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00234.txt.bz2 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: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple