In our example, well use the -f option to force write, -n to specify the number of times to overwrite, and -v to display the ongoing operation. Its overwriting patterns are optimized to destroy as much residual data as possible, so this is your best bet if youre trying to wipe the USB completely. Using dd is very simple the base syntax is as follows:įor instance, if you wanted to write random data instead of zeroes to a USB mounted at /dev/sdb1, you would use the following command:ĭd if=/dev/urandom of=/dev/sdb1 bs=16M Using Shred This is a good idea if you plan to lend the USB or sell it to someone. You can use dd to either zero-fill or write random data to your USB drive, essentially formatting it and making the data unrecoverable. Afterward, mount the USB with the following commands:.Replace with your preferred filesystem (ext4, vfat, nfts, etc.) and execute the command.Use df -h to check the USBs device path.In any case, here are the steps to format your USB using mkfs: So, you can think of this method as using GParted but via the command line, although their origins are actually the other way around. GParted performs the disk operations through the mkfs utility. Now, mount the USB to make it accessible again.Adjust the partition size and other values as before and create the partition.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |