Re: Understanding how dd works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick O'Callaghan wrote:
On Wed, 2008-06-25 at 13:31 +0100, Dan Track wrote:
Thanks for the heads up on this. If the data blocks don't have
anything written into them, then what data is written into them when
using dd? if I restore the dd image will the blocks then be in the
same state i.e unwritten to?

Also following on from this if I create a file using dd let's say 2GB,
how does the filesystem know that all these blocks belong to the file
myfile.img, and where is the information stored to say that a block
has data written into it or not?

It's important to understand that this has nothing to do with 'dd', it's
simply how the Unix filesystem works, and since Linux is "culturally
derived" from Unix, it does the same thing. You would see the same
effect just by using 'cp' or even 'cat'.

cp knows how to handle sparse files. From the cp man page:

By default, sparse SOURCE files are detected by a crude heuristic and the corresponding DEST file is made sparse as well. That is the behavior selected by --sparse=auto. Specify --sparse=always to create a sparse DEST file whenever the SOURCE file contains a long enough sequence of zero bytes. Use --sparse=never to inhibit creation of sparse files.

So I would think that cp would give him a good copy...

Mikkel
--

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux