Netapp – PS2


dd if=/dev/random of=reallylargefile count=2M

To create an ISO image file named image.iso of a CD. Insert the source CD and unmount it first if auto CD mount is enabled, this is to improve performance by preventing random access to the mounted filesystem.
dd if=/dev/cdrom of=image.iso bs=2k
To create an image file named floppy.img of a floppy disk:
dd if=/dev/fd0 of=floppy.img
To copy the image file back to a floppy:
dd if=floppy.img of=/dev/fd0 bs=18k
To create a file of the size 1 GB with the name reallylargefile, filled with random data:
dd if=/dev/random of=reallylargefile count=2M
As above but faster and cryptographicly less secure
dd if=/dev/urandom of=reallylargefile count=2M
As above but faster by increasing block size:
dd if=/dev/urandom of=reallylargefile count=256k obs=4096
To create a file of the size 10 GB with the name virtualpartition, filled with zeros, and make it available as a ext2 virtual partition:
dd if=/dev/zero of=virtualpartition bs=1M count=10k
mke2fs virtualpartition (reply yes when it says it’s not a block device)
mkdir /mnt/virtual
mount -o loop virtualpartition /mnt/virtual/
To create a 10GB sparse file which doesn’t allocate any actual space (if the filesystem supports this feature):
dd if=/dev/zero of=sparsefile.img bs=1 seek=10G count=0
To copy the first partition of the first hard disk to the file partitionone.
dd if=/dev/hda1 of=partitionone
To copy the first IDE-harddisk (master) to the second IDE-hard disk (slave), i.e. clone the drive including file systems, partition tables and the master boot record.
dd if=/dev/hda of=/dev/hdb
For many more examples of the Linux dd command, which is the same as the UNIX version, go here:
Under Windows (GNU Unix Utils)
dd is available with the GNU Unix Utils.
Windows devices are named like \.\PhysicalDrive0 or \.\CDROM0.
To turn a CD into an ISO image:
dd if=\.\CDROM0 of=cdimage.iso obs=2048
Under Windows (Cygwin)
dd is also available within Cygwin (
The CD-Rom is typically available as /dev/scd0 (first SCSI-device).
To turn a CD into an ISO image do
dd if=/dev/scd0 of=cdimage.iso obs=2048


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: