Questions tagged [dd]

A common Unix program whose primary purpose is the low-level copying and conversion of raw data.

It is used to copy a specified number of bytes or blocks, performing on-the-fly byte order conversions, as well as more esoteric EBCDIC to ASCII conversions. It can also be used to copy regions of raw device files, for example backing up the boot sector of a hard disk, or to read fixed amounts of data from special files like /dev/zero or /dev/random.

595 questions
166
votes
7 answers

Why is “/dev/rdisk” about 20 times faster than “/dev/disk” in Mac OS X

According to the rasbery pi documentation, You can load your OS to a flash card with either /dev/disk or /dev/rdisk. rdisk stands for raw disk. /dev/disk is a block level device, why would rdisk be 20 times faster? Using Mac OSX Note: In OS X…
spuder
  • 10,135
152
votes
7 answers

How do I create a 1GB random file in Linux?

I am using the bash shell and would like to pipe the out of the command openssl rand -base64 1000 to the command dd such as dd if={output of openssl} of="sample.txt bs=1G count=1. I think I can use variables but I am however unsure how best to do…
89
votes
4 answers

Why is piping 'dd' through gzip so much faster than a direct copy?

I wanted to backup a path from a computer in my network to another computer in the same network over a 100 Mbit/s line. For this I did dd if=/local/path of=/remote/path/in/local/network/backup.img which gave me a very low network transfer speed of…
Foo Bar
  • 1,560
85
votes
15 answers

windows equivalent for dd

I need to read and write various flash card images. The way i always did this in linux was with dd, and that did the trick. What is a good windows equivalent? Simply put, i need to be able to read an entire card into a file and vice versa. I tried…
Jarmund
  • 6,277
  • 5
  • 38
  • 60
76
votes
2 answers

What does dd conv=sync,noerror do?

What's the effect of adding conv=sync,noerror when backing up an entire hard disk onto an image file? Is conv=sync,noerror a requirement when doing forensic stuff? If so, why is it the case with reference to Linux Fedora? Edit: OK, if I do dd…
dding
  • 817
72
votes
2 answers

What does an asterisk "*" mean in hexdump output?

I print MBR with hexdump and I get the following output: 000001a0 67 60 6f 70 65 72 61 74 69 6e 67 60 73 79 73 74 |g`operating`syst| 000001b0 65 6d 00 40 00 63 7b da c5 f5 61 68 00 40 00 40 |em.@.c{...ah.@.@| 000001c0 00 40 00 40 00 40 00 40 …
Rodnower
  • 2,259
63
votes
4 answers

How can I clone a hard drive directly to a vdi image

I would like to make a VirtualBox .vdi image out of my hard drive. I've found howto's online that describe doing this by first usind DD to create a .raw image, then using VBoxManage to convert the .raw to a .vdi. SO if my HD is 1 TB, this process…
57
votes
1 answer

dd function seems to freeze when done

I'm trying to copy an iso on a usb stick with this command: sudo dd bs=4M if=lubuntu-17.04-desktop-amd64.iso of=/dev/sdc status=progress What is quite straight forward. The iso is 912M big in size. Why does the output text freeze here instead of…
Natjo
  • 845
53
votes
4 answers

How to create a bootable USB from a bootable ISO with the command line on Linux?

I have a CD that's created from an ISO file which I use to install a custom version of Ubuntu via Plop Linux. The CD works fine but I'd like to use a bootable USB drive instead. I used the command dd to try and create the bootable USB: dd…
greggmi
  • 1,305
52
votes
2 answers

dd is producing a 32 MB random file instead of 1 GB

I wanted to produce a 1 GB random file, so I used following command. dd if=/dev/urandom of=output bs=1G count=1 But instead every time I launch this command I get a 32 MB file: <11:58:40>$ dd if=/dev/urandom of=output bs=1G count=1 0+1 records…
52
votes
6 answers

How Do I Find The Hardware Block Read Size for My Hard Drive?

I'm trying to figure out the optimal size for a large copy from my hard drive using dd. I'm trying to figure out what the best blocksize to use it, which I would assume is the hardware block size for that drive.
Flame
  • 765
44
votes
6 answers

Why does 'dd' not work for creating bootable USB?

Recently I wanted to create a bootable USB of Linux mint. I found that there was a lot of conflicting advice/experience about whether the 'dd' command could be used to create a bootable USB. I decided to download an ISO and try. While dd definitely…
jdowner
  • 554
44
votes
4 answers

How to output file from the specified offset, but not "dd bs=1 skip=N"?

How to do thing like dd if=somefile bs=1 skip=1337 count=31337000, but efficiently, not using not 1-byte reads and writes? The solution is expected: To be simple (for non-simple I can write some Perl oneliner that will do this) To support large…
Vi.
  • 17,755
43
votes
7 answers

How to create VHD disk image from a Linux live system?

Once more, I have to resort at the experts here at SuperUser, as my other sources (mainly Google ;-)) didn't prove very helpful... So basically, I would like to create a VHD image of a physical disk to be archived/accessed/maybe even mounted in a…
Federico
  • 1,130
42
votes
5 answers

Is there a method of getting a percentage on a DD in linux?

So here's what's happening. I started a backup of a drive on my server through a Linux live USB. I started copying the first drive with the dd command vanilla; just sudo dd if=/dev/sda of=/dev/sdc1 and then I remembered that this just leaves the…
user865814
1
2 3
39 40