
Join the nixCraft community via RSS Feed, Email Newsletter or follow on Twitter. He wrote more than 7k+ posts and helped numerous readers to master IT topics. Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source.

See “ Linux: Save and Recover Data From Crashed Disks With ddrescue Command Like a Pro” for more information. Sudo apt install gddrescue # debian/ubuntu and friends # Sudo yum install ddrescue # centos/rhel from EPEL repo # $ scp ~/usb-opensuse-current.img scp ~/usb-opensuse-current.img Say hello to ddresuceįirst, you need to install ddrescue using the dnf command/ yum command/ apt command/ apt-get command as per your Linux distro: I usually like to keep on a FreeNAS or Linux NAS server using the scp command: $ ls -l ~/usb-opensuse-current.img Optional: Copy file usb-opensuse-current.img to NAS server or external mediaīe sure that you copy ~/usb-opensuse-current.img somewhere safe. $ sudo chown vivek:users ~/usb-opensuse-current.img You may want to change file permission too as the sudo command created the image with root:root. $ sudo dd if=/dev/sdb of=~/usb-opensuse-current.img bs=4M status=progress You can show progress copy bar with status option for the dd command: $ sudo dd if=/dev/sdb of=~/usb-opensuse-current.img bs=4M To clone a usb stick named /dev/sdb to ~/usb-opensuse-current.img, run: Use dd command to copy and clone a usb stick on Linuxĭd if=/dev/sdX of=/path/to/file.img bs=SIZE

OR use the fdisk command to list the Linux disk partition tables for the specified devices and its size:


Additionally, one can run the following lsblk command lists information about all available or the specified block devices: sd 6: 0: 0: 0: Attached scsi generic sg1 type 0 sd 6:0:0:0: Attached SCSI removable disk Sd 0: 0: 0: 0: Attached scsi generic sg0 type 0 sd 0:0:0:0: Attached SCSI disk
