X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Message-ID: <50817405.8080104@gmail.com> Date: Fri, 19 Oct 2012 17:38:45 +0200 From: marco atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Using dd command and copy References: <1350648468079-93690 DOT post AT n5 DOT nabble DOT com> <50815062 DOT 50002 AT gmail DOT com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 On 10/19/2012 5:28 PM, wing cheng wrote: > Unfortunately it is not working.... there are still files corrupted. Any > idea? > use the list please. > On Fri, Oct 19, 2012 at 2:06 PM, marco atzeri wrote: > > On 10/19/2012 2:07 PM, chesschi wrote: > > Hi all, > > I am trying to write a script to do a "dd" to copy an image from > a local > disk to a USB flash drive followed by copying some other files > to the flash > drive. > > e.g. if the flash drive is d and mapped to /dev/sdb > dd if=myfiles.iso of=/dev/sdb > cd myfolder > cp -rf */cygdrive/d > > > After dd and copy finishes, I eject the flash drive and reinsert > to the USB > port. I found that some of the files are courrpted! > > If I dd first, eject the USB flash drive then do the copying, it > is okay. > > Is there a way to automate this procedure without manually > ejecting the > flash drive? Thank you. > > > have you tested sync instead of ejecting ? > > > -- 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