dd Copy disk, pendrive etc..

DD is powerful tools for copy low level data , raw data

Using dd to duplicate one hard disk. The target and destination disks should have the same size.

dd if=/dev/sda2 of=/dev/sdb2 bs=4096 conv=noerror

Copy disk over ssh protocol to another computer

dd if=/dev/sdb2 | ssh jacek@ "dd of=/home/user/consolechars.img"

You are copying data

#for copy tour disk
dd if=/dev/sdb of=/home/user/consolechars.img

#For restore your disk
if=/home/user/consolechars.img of=/dev/sdb

Make an iso image of a CD:

dd if=/dev/hdc of=/home/sam/mycd.iso bs=2048 conv=notrunc

You are copying with packing data

#for copy tour disk
dd if=/dev/sdb | gzip -c  > /consolechars.img

#For restore your disk
gunzip -c /consolechars.img.gz | dd of=/dev/sdb

To search the system memory:

#To view your virtual memory
dd if=/proc/kcore | hexdump -C | less

#dumps one screen at a time to the terminal
#What filesystems are installed
dd if=/proc/filesystems | hexdump -C | less

#all loaded modules
dd if=/proc/kallsyms | hexdump -C | less

#interrupt table
dd if=/proc/interrupts | hexdump -C | less

#How many seconds has the system been up
dd if=/proc/uptime | hexdump -C | less

#partitions and sizes in kb
dd if=/proc/partitions | hexdump -C | less

#Memory stats
dd if=/proc/meminfo | hexdump -C | less

Wipe pendrive or another disk

# is slowly 
for iks in kik{1..10} ; do dd if=/dev/urandom of=/dev/sdb bs=8b conv=notrunc; done 

Route microfon to speakers in another pc over ssh

dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s