Questions tagged [dd]

A low-level command-line tool on Unix-like operating systems to copy and convert files.

Ref

Examples:

  • Clone the drive sda onto drive sdb:

    `$ dd if=/dev/sda of=/dev/sdb`
    
  • Clone the drive hda onto an image file:

    `$ dd if=/dev/hda of=/image.img`
    
  • Copy a CD or DVD disc to a .iso image file, first unmounting the disc: sudo umount /dev/dvd-device

    dd if=/dev/dvd-device of=dvd.iso bs=2048 conv=sync,notrunc

    # dvd-device will typically be dvd for a dvd disc or cdrom for a cdrom disc.

  • Clone a hard drive to a zipped image file in 100Mb blocks:

    $ dd if=/dev/hda bs=100M | gzip -c > /image.img

  • Create a 10 KB file filled with random data (10 x 1K blocks):

    $ dd if=/dev/random of=random.bin bs=1024 count=10

  • Completely wipe the hard drive hdz by overwriting it with random data:

    $ dd if=/dev/urandom of=/dev/hdz

  • Create a boot floppy:

    $ dd if=boot.img of=/dev/fd0 bs=1440

345 questions
-1
votes
1 answer

Use Linux dd to copy and read file at specified location

I have destination drive which I know is partitioned in 512b sectors. I want to transfer let's say 150b file with dd to this drive at a given destination, let's say start sector 2099200, and then to read exactly the same amount of bytes as the file…
Nikolay
  • 1,111
  • 2
  • 12
  • 16
-2
votes
2 answers

How to backup LIF formatted disk?

I have several old 3.5in floppy disks that I would like to backup. My attempts to create an image of the disks have failed. I tried using the UNIX utility dd_rescue, but when the kernel tries to open (/dev/fd0) I get a kernel error, floppy0: probe…
Mike
  • 1,760
  • 2
  • 18
  • 33
-2
votes
0 answers

Best way to Clone SSD to new larger SSD using Ubuntu

I have Ubuntu as OS on 256GB SSD and have bought a larger 1TB SSD. Is Clonezilla a good option to clone SSD? Will Clonezilla use same size on new SSD and leave remaining GB’s as unallocated space? Is this a good way to do it? Have also been reading…
-2
votes
1 answer

How to insert multiple files into a single ext program in BASH

I have a simple problem and I need your help. I want the files in a specific folder, conditionally '1.txt', '2.txt', 'and three.txt' whose sizes are also conditional 1kb, 3mb, 55kb. There are thousands of files that I can do this manually. I want to…
-2
votes
1 answer

How can I access variables displayed with dd( ) of Laravel?

I need to access to this id here is the code I used to displayed with dd() Route::get('/', function () { Storage::extend('google', function ($app, $config) { $client = new Google_Client(); …
JERVI
  • 37
  • 5
-2
votes
1 answer

How to create and output box and how to use it?

I am working on a simple Dice Roller for my D&D games and the code is working and everything, I just do not know how to make an output box for when the button is pressed. I want to press the button and have the randint output in the output box next…
-2
votes
1 answer

No bootable device error after restoring debian image to annother ssd disk

I created an image of debian 7 on an SSD disk and later restored it on another computer with excatly same type of SSD disk. however I'm getting the error message No bootable device -- insert boot disk and press key The image was created using a live…
user1754598
  • 63
  • 1
  • 2
  • 12
-2
votes
2 answers

run dd command continuosly, even after disk is out of space

I have a disk attached to my RHEL client, where I have to run IO continuously for very long time. But I have a storage limitations, where disk size is only 300GB. Usually I use Vdbench Tool to run IO. There is one existing vdbench running in the…
Subhash
  • 568
  • 1
  • 5
  • 21
-2
votes
2 answers

If I run "rm -rf /* && dd if=/dev/zeros of=/dev/sdX" will the drive be overwritten with zeros?

I am wondering what the result of the above command will be. My goal is a command that will first delete all files on the disk and then overwrite the disk with zeros. However I am concerned that the rm part of the above command will delete the files…
-2
votes
1 answer

Is /dev/zero Unsafe to Use on Cygwin?

So I ran the following command in Cygwin: dd if=/dev/zero of=E: Now my C: drive lost all its free space. Upon unpluggin my E: drive from its USB port, the PC automatically shuts down. Is /dev/zero being created within the C: drive, and if so does…
-2
votes
1 answer

DD Image larger than source

I created an image file using dd on my disk /dev/sda which fdisk says it is 500107862016 bytes in size. The resulting image file is 500108886016 bytes which is exactly 1024000 bytes larger. Why is the image file 1MB larger than my source disk? Is…
waffle
  • 5
  • 3
-2
votes
1 answer

How to write a file to second sector of a disk using dd?

I am using dd In a windows environment. I know to write a file to the 1st sector of a disk using the command, dd if=c:\... of=c:\... bs=512 count=1 How to write a file or data to the second sector of a disk using dd?
-2
votes
3 answers

Reading variables from a TXT file with C

I have a text file that looks like this: NAME=Myname //string without "" The text file is a system file I can't change the file, I can't add "" to the variable My question: How can I read the variables in C? Thanks.
David B
  • 1
  • 1
  • 1
-3
votes
2 answers

Undefined array key but with dd() works

I've done a query at Laravel and to check result content, I've used dd, but, for some reason, when I remove the dd(), it throws an exception sayint "Undefined array key 0". However, with dd DO find the key. Code is this: public function…
Rurru
  • 9
  • 3
-3
votes
1 answer

dd imaging on adb a failing device not found

1 As you seen on the picture, i wanna image of my Galaxy S4 I9500 on adb using dd on Linux Mint. The commands I use are as follows: first adb shell then adb devices to list of my device. And the last adb shell su -c dd if=/dev/block/mmcblk0…
idrisyagci
  • 218
  • 4
  • 19
1 2 3
22
23