Obviously what I'm about to describe is better handled by rsync or cp, but...

Say I have two drives on my computer. Could I make one a perfect image of the other with the following command? Would files on sda be accessible on sdb through the file system?

cat /dev/sda > /dev/sdb

My inclination is that each device could (potentially) be too different from the other for a blind write like this to work.


Much better way to copy disk to disk is to use dd:

dd if=/dev/sda of=/dev/sdb

But this will work well only if sda is smaller or equivalent by size to sdb. The same is true about the files on sdb.

If you want to have files on smaller sdb use rsync with some filter (to be sure you will sync successfully the files from sda to sdb)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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