LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Question about disk dump (dd) (https://www.linuxquestions.org/questions/linux-software-2/question-about-disk-dump-dd-905801/)

Claxton 09-30-2011 12:32 PM

Question about disk dump (dd)
 
I have installed Ubuntu 11.04 on a USB key and customized it until it was small enough (1 Gb), this key has a capacity of 2.9 Gb.

Code:

:~$ df -h /dev/sdc1
Filesystem
/dev/sdc1 2.9G 1.1G 1.7G 38% /media/CA-90

I want to make an ISO file to back it up, but when I use dd

Code:

sudo dd if=/dev/sdb1 of=backup.iso
I get a large file that is exactly the exact size of the whole USB capacity (2.9 Gb), this is larger than the actual files of the USB drive (1.1 Gb)

Why is this happening?

macemoneta 09-30-2011 04:14 PM

The 'dd' command copies physical data, and does not access the filesystem on the device. As a result, you are creating an image of the physical media. The physical media is 2.9GB, so the copy is 2.9GB. If you'd like to only copy the data, you can use a tool that accesses the data via the filesystem, like rsync.


All times are GMT -5. The time now is 08:36 AM.