Linked Questions

161 votes
9 answers

dd vs cat -- is dd still relevant these days?

I recently realized we can use cat as much as dd, and it's actually faster than dd I know that dd was useful in dealing with tapes where block size actually mattered in correctness, not just ...
kizzx2's user avatar
  • 1,833
33 votes
12 answers

Erasing a Linux laptop

I have a laptop with Debian on it, and I am going to sell this laptop. Would it suffice to erase the Debian installation before selling it to completely clean up my laptop from my personal data, and ...
user avatar
45 votes
5 answers

Full DD copy from hdd to hdd

ORIGINAL QUESTION: If I have 2 identical hard drives with the following characteristics: SATA 6.0 Gb/s 5400 rpm 3TB How long should a full dd copy take to complete? So far it's been running for 5 ...
oshirowanen's user avatar
  • 2,581
60 votes
3 answers

Is it better to use cat, dd, pv or another procedure to copy a CD/DVD?

Background I'm copying some data CDs/DVDs to ISO files to use them later without the need of them in the drive. I'm looking on the Net for procedures and I found a lot: Use of cat to copy a medium: ...
user avatar
31 votes
4 answers

Why dd takes too long?

I need to copy one disk to another. I tried with the command below and it takes nearly a day to copy 1 TB of disk in federo. dd if=/dev/sda of=/dev/sdb I have tried the same on a Unix(HP-UX) system ...
KKD's user avatar
  • 610
40 votes
4 answers

Why does dd from /dev/random give different file sizes?

I am running the following command on an ubuntu system: dd if=/dev/random of=rand bs=1K count=2 However, every time I run it, I end up with a file of a different size. Why is this? How can I ...
Daniel's user avatar
  • 1,167
20 votes
4 answers

Got "No space left on device" when cloning 1TB disk to 1.2TB disk using dd

I am trying to using the following dd command to clone remote xfs disk to another location. ssh root@source_ip "dd if=/dev/vda2 bs=16M conv=noerror,sync status=progress " | sudo dd of=/dev/nvme1n1 ...
Tim's user avatar
  • 317
84 votes
2 answers

When is dd suitable for copying data? (or, when are read() and write() partial)

Short version: In what circumstances is dd safe to use for copying data, safe meaning that there is no risk of corruption due to a partial read or write? Long version — preamble: dd is often used to ...
Gilles 'SO- stop being evil''s user avatar
22 votes
5 answers

Does dd do any kind of verification?

I'm using dd to copy data from an old hard drive to a new one. I want to be sure that the data's integrity is secure. On this answer, Gilles says If [dd] terminated successfully, then the backup ...
Sparhawk's user avatar
  • 19.6k
31 votes
3 answers

How to unzip and dd a disk image to an SD Card with a single command?

I am under the following restrictions: I have a 1.0 GB .zip file on my computer which contains one file, a disk image of raspbian. When uncompressed, this file is 3.2 GB large and named 2015-11-21-...
IQAndreas's user avatar
  • 10.2k
22 votes
6 answers

can 'dd' be used to clone to a smaller HDD, knowing that partitions will need editing?

I've used dd to clone disks like this: dd if=/dev/sdb of=/dev/sda bs=4096 conv=notrunc,noerror,sync And it's always worked fine. Any and all docs on 'dd' take pains to remind you that the target ...
Ray Andrews's user avatar
  • 2,145
21 votes
4 answers

Read the middle of a large file

I have a 1 TB file. I would like to read from byte 12345678901 to byte 19876543212 and put that on standard output on a machine with 100 MB RAM. I can easily write a perl script that does this. ...
Ole Tange's user avatar
  • 33.8k
13 votes
5 answers

Resuming a DD of an entire disk

I'm overwriting my hard drive with random data using the good old dd: dd if=/dev/urandom of=/dev/disk/by-uuid/etc bs=512 It's a 2TB array and my MacBook (running Linux, ok?) can only write data at ...
Naftuli Kay's user avatar
  • 38.7k
12 votes
5 answers

How can I clone/backup/restore Windows 10 from Linux?

Case scenario: $ sudo fdisk -l Disk /dev/sda: 223,6 GiB, 240057409536 bytes, 468862128 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (...
Sopalajo de Arrierez's user avatar
8 votes
3 answers

Does dd copy everything, including all metadata and all "empty" blocks

Suddenly something was messed up with my partitions, or just one partition. I have a default Ubuntu installation, on a Kingston SSD, with the root file system encrypted with LUKS, (using AES I think). ...
Mads Skjern's user avatar

15 30 50 per page