delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/10/19/08:08:14

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=4.7 required=5.0 tests=AWL,BAYES_50,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_NEUTRAL,URI_HEX
X-Spam-Check-By: sourceware.org
Date: Fri, 19 Oct 2012 05:07:48 -0700 (PDT)
From: chesschi <chesschi AT gmail DOT com>
To: cygwin AT cygwin DOT com
Message-ID: <1350648468079-93690.post@n5.nabble.com>
Subject: Using dd command and copy
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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.



--
View this message in context: http://cygwin.1069669.n5.nabble.com/Using-dd-command-and-copy-tp93690.html
Sent from the Cygwin list mailing list archive at Nabble.com.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019