Re: copying partitions

From: James Wilkinson (fedora_at_westexe.demon.co.uk)
Date: 05/20/05

  • Next message: Aleksandar Milivojevic: "Re: Cups printer on FC3"
    Date: Fri, 20 May 2005 17:31:02 +0100
    To: fedora-list@redhat.com
    
    

    Michael Hennebry wrote:
    > What would dd do?
    > I've never had much of a clue what, besides some reformatting,
    > dd does that cp does not.
    > E.g. if there is no file, there is nothing to which one can set
    > if and of, hence dd would copy from standard input to
    > standard output.
    > I assume there is something wrong with that logic,
    > but I don't know what.

    Ermm... oops?

    I seem to have been labouring under a misapprehension.

    I assumed that when you cp a device node, what you get is a copy of the
    device node. (And if you use cp -R, you get just that).

    cp -R /dev/hda7 /tmp
    ls -l /tmp/hda7
    brw-r----- 1 root root 3, 65 May 20 16:49 hda7

    I thought that was what normal cp did, too.

    Instead, cp opens the device node for reading, and copies all the
    output. So cp /dev/hda7 /scratch will create a *very* large file in
    /scratch. If the appropriate partition contains a filesystem, you'll get
    a copy of that filesystem which you should be able to loopback mount.

    Thanks for making me check that and learn something,

    James.

    -- 
    E-mail address: james |  ... more holes in Internet Explorer than
    @westexe.demon.co.uk  | Blackburn, Lancashire...
                          |     -- http://theinquirer.net/?article=17235
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Aleksandar Milivojevic: "Re: Cups printer on FC3"

    Relevant Pages