How to Transfer Data Between Two Hard Drives in LINUX

Dear sir,
Could you please tell me How to Transfer Data Between Two Hard Drives in LINUX ?
I hope a positive response from any one else,
thanks in advance
Meressa Abrha
3 answers Last reply
More about transfer data hard drives linux
  1. You did not specify what kind of Linux you are using.
    Also not whether your disks are SATA/PATA etc.

    But generally, you can try the dd command.

    First, open a terminal, and execute:

    dmesg | grep sd

    exactly like that, it should give you a list of your harddrives (/dev/sda or /dev/sdb). Once you know which is which, by looking at the size of the drives, you can try the dd command below:

    sudo dd if=/dev/sda of=/dev/sdb bs=1M

    NOTE: In this example /dev/sda is the source/read device and /dev/sdb is the target/destination device, adjust accordingly. This command will read from disk /dev/sda and write to /dev/sdb, causing /dev/sdb to be an exact copy of /dev/sda. /dev/sdb needs to be at least as large as /dev/sda.

    WARNING: any mistakes with the dd-command, such as using the wrong device names, may lead to total data loss. Use with care!
  2. Note: my commands will make a clone of /dev/sda and write it to /dev/sdb. If you don't want to clone but just copy files of two normal disks with NTFS on it, you shouldn't use my dd-command.

    Please in the future add more information to your query so we may help you with more targeted and specific advice.
  3. > sudo dd if=/dev/sda of=/dev/sdb bs=1M

    ...and just as a cautionary note - don't type this command in verbatim! As sub mesa described, make sure you know which device ("/dev/sdx") is which before you start and use the right device names in the right positions in the command. That last thing you want to do is copy in the wrong direction!
Ask a new question

Read More

Hard Drives Linux Storage