User Tools

Site Tools


linux:sysadmin:cmd:dd

dd - dump device

create a dummy file

The following command creates a “dummy”-file named dummy.bin with a size of 100'000 bytes (98 KB):

dd if=/dev/zero of=dummy.bin bs=100000 count=1

Create 7000 dummy files:

#!/bin/bash
 
for i in `seq 1 7000`;
do
  dd if=/dev/zero of=dummy-$i bs=400000 count=1
done    
The command above creates files with a total size of about 2.7 G. Make sure you have enough disk space available.

create a disk image

dd if=/dev/hda bs=16065b | gzip -1 > /mnt/lotofspace/image.gz

load a disk image

gunzip -dc /mnt/lotofspace/image.gz | dd of=/dev/hdc bs=16065b
/srv/wiki.niwos.com/data/pages/linux/sysadmin/cmd/dd.txt · Last modified: 2009/08/15 12:14 (external edit)