Function Description: Convert or copy files, and backup the device at the same time.
Use format: dd if="input_file" of="output_file" bs="block_size" count="number" Option Description: if: is the input file, can be a device, such as a disk A partition or the entire disk. Of: is the output file, but also the output device, such as disk, tape, and so on. Bs: Specifies the size of a block. If not specified, the default is 512 bytes. Count: is the number of <;bs“. Example: 1. Back up the /etc/inittab file to /opt/inittab.bak and use the following command: [root@mylinux ~]# dd if=/etc/inittab of=/opt/inittab.bak3+1 records in3+1 records out [root@mylinux ~]#ls –al /etc/inittab /opt/inittab.bak-rw-r--r-- 1 root root 1666 Jul 22 17:37 /etc/inittab-rw-r--r -- 1 root root 1666 Jul 23 08:09 /opt/inittab.bak# Note that the above two files, the size does not have any similarities and differences, are 1666 bytes, because the size is not specified, "bs", so the default is 512 bytes A unit block, just above the above "3+1", that is: 3 means that there are 3 complete blocks of 512 bytes, and "1"" means that block of less than 512 bytes. 2. Back up the entire partition of /dev/sda2 and save the backup file to the /opt directory. Use the following command: [root@mylinux ~]# dd if=/dev/sda2 of=/opt/sda2.back#here is the disk The data of all partitions is backed up, and the dd command can also back up the data of the entire disk. The backup output path here must not be the partition of “/dev/sda2“ otherwise, it can't be backed up. 3. Restore the backup package /opt/sda2.back in the above example to the appropriate partition, using the following command: [root@mylinux ~]#dd if=/opt/sda2.back of=/dev/sda2#Special attention, in When restoring the target partition, be sure to uninstall the target partition first. After the recovery is complete, mount it. # Also note that the backup partition is best aligned with the restored partition. For example, in this example, the /opt/sda6.back” file is a backup of the partition of "/dev/sda2", so the most recovery Restore the "/opt/sda6.back” file to the &devquo;/dev/sda2” partition, or restore to a partition that is the same size as “/dev/sda2”. Because the restored target partition is larger than the partition at the time of backup, space will be wasted; on the contrary, the recovery target partition is smaller than the backup partition, and the space will be insufficient when the recovery is performed.
view mysql default encoding format show variables like “character%”; If the reality-bash
Although Linux systems are more secure than Windows, some simple security configurations are necess
What new features will the Linux 4.1 release bring?
Linux operating system mounts U disk and hard disk drive problem
Replace VMware ESX Server Console NIC and Recovery Solution
The service does not support the solution of chkconfig
Linux LAMP service rpm package installation and configuration basic tutorial
Linux shell string operation (length, find, replace) detailed
Linux system proc directory process information detailed
Shell script recursive function - traverse each directory to operate
Use Microsoft's own Chinese input method in Win 8
Setting up a mail server with Win 2003
How to modify the CPU information of Win8.1 system? Win8.1 system to modify the CPU name method
Win10 modified Edge browser /app store startup background color method
Microsoft reveals the technical details of Windows 7 virtual XP mode
Word typing to cover the following words of the solution
How to rename multiple files at the same time in Win10 system