Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #16900

Re: Is there a good "dd for dummies" tutorial around?

Newsgroups comp.os.linux.misc
Date 2016-02-29 18:05 -0800
References <9be980ce-21a2-4d14-bfb4-ad96dcd9a5a5@googlegroups.com> <ck6qpc-lj9.ln1@minas-tirith.valinor> <tgcqpc-dvg.ln1@Telcontar.valinor> <adbb4675-e3d0-4d13-a513-c53127b76d59@googlegroups.com> <naodst$2400$1@adenine.netfront.net>
Message-ID <2d2669ad-a8d1-4d1a-8fc5-22132a2c4aac@googlegroups.com> (permalink)
Subject Re: Is there a good "dd for dummies" tutorial around?
From pureheart@pacbell.net

Show all headers | View raw


On Thursday, February 25, 2016 at 6:39:31 PM UTC-8, Carlos E. R. wrote:
> On 2016-02-25 00:55, pur.....ll.net wrote:
> 
> > Hi Carlos.
> > Thank you and all the others for the replies.
> > I have no task in mind, I just have a hard time understanding how it can do *anything* to unmounted drives....the replies have helped set me straight, Mr. Heller's reply, especially.
> 
> Ah.
> 
> Well, it is nothing specific to 'dd', but how Linux (or Unix) works.
> Everything is a file. You can write to files, as in Windows, but you can
> also directly write to the raw disk, without format. For this we write
> to the file that represents the disk (say, /dev/sdb2). And in order that
> nothing interferes, we umount it.
> 
> That is, we can write to the disk directly, or to the formatted
> structure that is the same disk when mounted. With files and
> directories. Two views of the same thing.
> 
Boy, now I finally get it.  Thanks, Carlos.
So that means would write *anything* to the drive (or any file, I guess) 
without regards to any formatting such as whatever ext4 et. al. does to the
thing when it sets it up.

So of course if you wrote a giant text file, for example, all the formatting
would be loss for any filesystem that happened to be there, correct?

But what if you wanted to read that giant disk full of text back off?  
Would you be successful just as long as you knew that to expect was coming 
back off?

If your output was to a file on a "mounted" device, would it then be formatted
extX style file readable by anything?

Well, in any case, I think I'm going to stay well away from it unless I have a real need for it for some reason.

Thanks for taking the time to help me out.

pH in Aptos



> 
> In MSdos, or Windows, in order to write to the disk directly you need
> specially written software.
> 
> In Linux, you can edit a text file and write it as normal file, or you
> can directly write it to the raw disk, without format. Say:
> 
> echo "Hello World" > /dev/sdb
> 
> Of course, the disk would only contain that. A waste. You could write a
> thousand files one after the other, and somehow mark when each one
> starts and ends. Using tar, for instance. Tapes were done this way,
> actually. Databases can used on a partition without format. Some
> database prefer it this way.
> 
> The database, or the tar archive, would first store some structure that
> allows for locating where each thing we store on the disk is. Up to us
> to define everything.
> 
> Instead, a mounted disk has an structure that does the same thing, but
> for general use. It contains metadata assigning blocks to files, lists
> of files, and files. And instead of writing to "/dev/sdb5", we would
> write to "/mnt/somewwere" (arbitrary).
> 
> 
> What makes 'dd' different is that it has options that make it suitable
> to raw device writing. Like writing to a specific spot.
> 
> -- 
> Cheers,
>        Carlos E.R.
> 
> --- news://freenews.netfront.net/ - complaints: news@netfront.net ---

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Is there a good "dd for dummies" tutorial around? pureheart@pacbell.net - 2016-02-20 10:04 -0800
  Re: Is there a good "dd for dummies" tutorial around? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2016-02-20 20:24 +0200
  Re: Is there a good "dd for dummies" tutorial around? William Unruh <unruh@invalid.ca> - 2016-02-20 18:26 +0000
  Re: Is there a good "dd for dummies" tutorial around? Robert Heller <heller@deepsoft.com> - 2016-02-20 12:40 -0600
  Re: Is there a good "dd for dummies" tutorial around? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2016-02-20 14:10 -0500
  Re: Is there a good "dd for dummies" tutorial around? "Carlos E. R." <robin_listas@invalid.es> - 2016-02-22 02:59 +0100
    Re: Is there a good "dd for dummies" tutorial around? "Carlos E.R." <robin_listas@invalid.es> - 2016-02-22 04:39 +0100
      Re: Is there a good "dd for dummies" tutorial around? pureheart@pacbell.net - 2016-02-24 15:55 -0800
        Re: Is there a good "dd for dummies" tutorial around? "Carlos E. R." <robin_listas@invalid.es> - 2016-02-26 03:39 +0100
          Re: Is there a good "dd for dummies" tutorial around? pureheart@pacbell.net - 2016-02-29 18:05 -0800
            Re: Is there a good "dd for dummies" tutorial around? The Natural Philosopher <tnp@invalid.invalid> - 2016-03-01 02:45 +0000
            Re: Is there a good "dd for dummies" tutorial around? "Carlos E.R." <robin_listas@invalid.es> - 2016-03-01 11:14 +0100

csiph-web