public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: chesschi <chesschi@gmail.com>
To: cygwin@cygwin.com
Subject: Using dd command and copy
Date: Fri, 19 Oct 2012 12:07:00 -0000	[thread overview]
Message-ID: <1350648468079-93690.post@n5.nabble.com> (raw)

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

             reply	other threads:[~2012-10-19 12:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 12:07 chesschi [this message]
     [not found] ` <50815062.50002@gmail.com>
     [not found]   ` <CAHHHhBab-_AiwLLGE69UT1yCY6WEP=AY_38vBGN2JcJmFmyHxQ@mail.gmail.com>
2012-10-19 15:38     ` marco atzeri
2012-10-19 15:56       ` chesschi
2012-10-19 16:06         ` marco atzeri
2012-10-19 16:34           ` Corinna Vinschen
2012-10-22 11:31             ` chesschi

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=1350648468079-93690.post@n5.nabble.com \
    --to=chesschi@gmail.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).