Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I run:

sudo dd if=/dev/sda1 of=~/image.img bs=1M

Will the image.img (which is located on /dev/sda1) be continuously copied onto itself? As it gets bigger from data, will that additional data be written in the image and continue forever?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

No, you will run out of disk space before the operation completes. The disk image image.img will be unusable.

share|improve this answer
    
Oh! Wow i completely overlooked that. But technically if lets say the image.img was stored near the beginning of the block of the hard drive, would the image copy itself, or is there a RAM buffer of sorts –  agz Jan 13 '13 at 18:49
1  
Yes, you might get a partial copy of image.img in the image itself. No, it won't go on indefinitely. –  Michael Hampton Jan 13 '13 at 18:55
    
Ok thanks for the info! –  agz Jan 13 '13 at 19:17
add comment

Imagine an object trying to eat itself. To contain itself in addition to itself it must be at least twice as big.

share|improve this answer
    
Nothing can be twice as big as itself. :) –  Michael Hampton Jan 13 '13 at 19:22
    
Hence we have a contradiction! –  Herman Torjussen Jan 13 '13 at 21:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.