dd if=<source> of=<target>
Duplicate sda2 into sdb2
dd if=/dev/sda2 of=/dev/sdb2 bs=4096 conv=notrunc,noerror
Fixing old hard drive:
Code:
dd if=/dev/sda of=/dev/sda
dd if=/dev/sda2 of=/dev/sdb2 bs=4096 conv=notrunc,noerror
dd if=/dev/sda of=/dev/sda
username@machinename:~$
username@machinename:~$ pwd
home/rootfolder
username@machinename:~$ ls
Folder1 Folder2 Folder3
username@machinename:~$ cd Folder1
username@machinename:~/Folder1$To return back to Home Folder:
username@machinename:~/Folder1$ cd ~
username@machinename:~$
username@machinename:~$ cd /
username@machinename:/$ ls
bin dev initrd.img media root srv usr
boot etc lib mnt sbin sys var
cdrom home lost+found proc selinux tmp vmlinuz
username@machinename:/media$ cd ..
username@machinename:/$
username@machinename:/media$ cd ../boot
username@machinename:/boot$