Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Background: Got a new laptop recently. Got Ubuntu working on it and copied everything I needed from my old laptop's Ubuntu installation thusly. However, I had an NTFS partition on my old machine with some data I'd like to keep. I've resized this HDD's partitions to make space for it, but I still have to copy it.

If worse comes to worst, I guess I could make a new NTFS partition of the same size with GParted, mount them on both machines, and use ssh/rsync to copy all the files, but there's probably a better/easier/more efficient way to go about it. I did some Google searches to the effect of "copy ntfs partition over lan," but there's too much out there to process. I try to solve these problems with Google when I can, but in this case, I think I've gotten to the point of needing to ask people directly.

share|improve this question

You can use the dd command for that. If you wanted to clone an entire disk, you would do something like sudo dd if=/dev/sda of=/dev/sdb. That would make sdb a complete copy of sda, including partitions and everything. It does not check that there's room on the second disk, so make sure there is.

To copy a filesystem from one partition to the other, is just as easy: sudo dd if=/dev/sda5 of=/dev/sdxx. IF is for input file and OF is for output file. You can do this with files as well. For instance, to copy a filesystem to a file, you'll use sudo dd=/dev/sda1 of=/path/to/somefile.img. You could then transport the file however you wished, and then use the file as the input and the partition as output; dd if=/path/to/image.img of=/dev/sda1.

share|improve this answer
Does this work even if the other disk isn't on the same machine? – Shay Guy Jan 1 '12 at 9:21
I have a feeling the author wants to copy data from one computer to another over LAN. I'm not sure dd will help in this case – Sergey Jan 1 '12 at 9:22
As I explained in the answer, you can copy the file system onto a file. This file can then be copied as any other file, and then you reverse the process on the other machine and use the file as input and the disk as output. – Jo-Erlend Schinstad Jan 1 '12 at 22:41

What about copying data using a normal GIU file manager of your choice? When copying data over network, the underlying filesystem is largely irrelevant. If the partition is not shared over network already and you prefer a command-line solution, then using scp or rsync is probably the easiest.

share|improve this answer

Your Answer


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.