Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 1 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

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! – user111228 Jan 13 '13 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .