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
0
votes
1 answer

Creating an image of a drive cloned with ddrescue.

We have an old server with disk failures that we've tried to clone into VMSphere. This resulted in an error from what that error came from we couldn't pin point. With ddrescue we cloned the machine to a 2TB external hard drive that we can use to lab…
HenrikM
  • 427
  • 6
  • 19
0
votes
1 answer

How to get an image from Android YAFFS2 and be able to mount/read it?

For academic/forensic reasons I want to get an image from my SmartPhone and study it. The File System is YAFFS2. From adb shell and using 'cat proc/mtd' I can see that I have for partitions: system,appslog,cache,userdata. I can get the four images…
0
votes
3 answers

Sudo without password to run dd command Python

So i've searched through all the questions on this site (maybe not all, but most), and none of them have quite the right answer for what i'm looking for! Part of my code, in Python, is setup as: specialstring = special if input == "T" trash =…
ohhiloveyouu
  • 101
  • 3
  • 8
0
votes
2 answers

Extracting a changeable string from a list and insertion in Python

I have a list that looks like this: ['2 19 2839475239874 hda'] I need to extract the hda from the end. However, the hda may not always be the last chunk, hda may not always be only 3 letters (it could be 4 or 5, and it could include numbers);…
ohhiloveyouu
  • 101
  • 3
  • 8
0
votes
2 answers

Setting a linux variable to a command line output

I am using QNX to modify some files and then output some information abou those files. the process is similar to the following: find certain files in a directory if the names are less than a value perfomr dd command output file - info -…
0
votes
1 answer

using "dd" to capture and restore fails?

I used dd to capture the two local vm partitions like this... # dd if=/dev/sda1 | gzip >mySda1.gz # dd if=/dev/sda2 | gzip >mySda2.gz Then I attached two volumes of sufficient size to an already running instance and mounted them (as /mnt/one and…
dmohr
  • 2,699
  • 1
  • 22
  • 22
0
votes
3 answers

Flashing an internal SD card that is mounted as root

I am working on an embedded linux device that has an internal SD card. This device needs to be updatable without opening the device and taking out the SD card. The goal is to allow users to update their device with a USB flash drive. I would like to…
beta
  • 647
  • 5
  • 19
0
votes
1 answer

Download DRM Files on my develop android app

I'm newbe in android development. I bulid app for automatic downloader, every downloads work properly and save on my sd card, but the drm file not open on device. I explain my self, I try download file with extension dd\dm, If the regular browser…
user1659684
  • 1
  • 1
  • 3
0
votes
3 answers

What is the command dd if=/dev/sdb do?

I have formated my pendrive and it is in /dev/sdb. When I execute the command dd if=/dev/sdb command it keep printing some junk in console. My doubt is, when I format the pendrive and execute this command, it should not print anything. But why it is…
duslabo
  • 1,487
  • 4
  • 20
  • 33
0
votes
2 answers

Alternative to using dd in windows

In a build operation I am attempting to do on Windows (7, if it matters), I need to execute the command dd status=noxfer conv=notrunc if=data.bin of=disk.flp on object code from assembly (nasm with -f bin). Is there a way to do this without…
Nathan Ringo
  • 973
  • 2
  • 10
  • 30
0
votes
1 answer

getting /dev/disk0 error when using dd command on iPhone mobile terminal

I am using the command dd if=/dev/disk0 | ssh username@labtop ip address 'dd of=iphone-dump.img' but am getting this: dd: reading '/dev/disk0': Invalid argument. I am using iPhone 4 with iOs 5.1 and am trying to get some family photos back that I…
-1
votes
1 answer

HTML dd empty cell is not taking the equal space

I am using dl dt dd html structure to create Grid. Everything is working fine. But if any dd cell is not having the value or if it is empty then its not taking the equal space or width as compare to valued dd cell. We can see in the below image…
sunil
  • 145
  • 1
  • 12
-1
votes
2 answers

What is causing huge performance differences in these c write() calls?

Does anybody see the difference between these two lines? 1) ret = write( fd_out, local_bugger, bytes_to_move); 2) nwritten = write (fd, buf + total_written, size - total_written); Obviously, not the naming conventions. Specifically, one is…
c card
  • 213
  • 3
  • 10
-1
votes
1 answer

throttle data transfer using dd over ssh connection

I am using dd to transfer data over two machines, command which used is , dd bs=1M if=/dev/loop0 status=progress | sshpass -p mypassword ssh root@192.168.111.11 dd bs=1M of=/dev/loop0 iflag=fullblock conv=sparse Aim is to throttle the network…
Akhil V Suku
  • 870
  • 2
  • 13
  • 34
-1
votes
2 answers

i cant get this TypeError fixed

error message: `Traceback (most recent call last): File "main.py" line 23, in if gold>="4": TypeError: '>=" not supported between instances of 'int' and 'str'` my code: Code: import…