//Tips tagged dd
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Give the finger to forensics.
will zero all free space on your partition. (/dev/random can be used if you're paranoid)
dd if=/dev/zero of=DELETEME; sync; rm -f DELETEME
will zero all free space on your partition. (/dev/random can be used if you're paranoid)
You can use the following to output your microphone to a remote computer's speaker:
This will output the sound from your microphone port to the ssh target computer's speaker port. The sound quality is very bad, so you will hear a lot of hissing.
dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp
This will output the sound from your microphone port to the ssh target computer's speaker port. The sound quality is very bad, so you will hear a lot of hissing.
Backup your MBR:
Restore MBR:
Restore only bootstrap (part of MBR):
Restore only partition table (part of MBR):
If you want to learn more about mbr check here: http://en.wikipedia.org/wiki/Master_boot_record
dd if=/dev/sda of=/root/mbr.img bs=1 count=512
Restore MBR:
dd if=/root/mbr.img of=/dev/sda bs=1 count=512
Restore only bootstrap (part of MBR):
dd if=/temp/mbr.img of=/dev/sda bs=1 count=446
Restore only partition table (part of MBR):
dd if=/temp/mbr.img of=/dev/sda skip=446 seek=446 bs=1 count=64
If you want to learn more about mbr check here: http://en.wikipedia.org/wiki/Master_boot_record
Simply convert .nrg (Nero format) images to .iso format images with dd:
Nero writes a 300kb header onto the iso, so dropping the first 300kb results in a .iso format image.
Nero writes a 300kb header onto the iso, so dropping the first 300kb results in a .iso format image.
dd bs=1k if=NRG_FILE of=ISO_FILE skip=300
Recently I needed several files of certain sizes for testing the transfer speed between two machines. Files like this can easily be created with the dd command which lets you create an empty file of desired size.
/dev/zero is a special file that provides as many null characters (ASCII NUL, 0×00) as are read from it. In the above example, the bs option sets both input and output block size to 1k. The count option specifies 2048 input blocks, so that command will create a file (named dummy_file) with a size of 2MB (2048k).
$ dd if=/dev/zero of=dummy_file bs=1k count=2048 2048+0 records in 2048+0 records out 2097152 bytes (2.1 MB) copied, 0.0190557 s, 110 MB/s $ ls -lh dummy_file -rw-r--r-- 1 user group 2.0M 2009-05-11 10:05 dummy_file
/dev/zero is a special file that provides as many null characters (ASCII NUL, 0×00) as are read from it. In the above example, the bs option sets both input and output block size to 1k. The count option specifies 2048 input blocks, so that command will create a file (named dummy_file) with a size of 2MB (2048k).

