Mileage may vary for other flavors of Linux. Note: These commands work for Ubuntu/Debian Linux distributions. Now I'm paying it forward and sharing some commands that helped me. The only safe ways of wiping data are the ATA Secure Erase command (if implemented correctly), or physical destruction. Use the following command to flush any outstanding I/O: blockdev -flushbufs device Remove any reference to the device's path-based name, like /dev/sd, /dev/disk/by-path or the major:minor number, in applications, scripts, or utilities on the system. Stack Overflow, blog posts, and help forums came to my rescue. 16 Answers Sorted by: 128 Warning: Modern disk/SSD hardware and modern filesystems may squirrel away data in places where you cannot delete them, so this process may still leave data on the disk. Hence, I probably googled 20 different things searching for solutions that could help me. There are several ways to list all the hard drives present in a system through Linux command lines. Not wanting to shell out a trivial amount of cash to upgrade the size of my EC2 instance or EBS volume, I began exploring how I could remove some unnecessary files on my machine that were taking up space. Recently my EBS (elastic block store) volume that I have attached to my EC2 instance became full. It's using a Linux AMI (Amazon machine image) that is woefully out of date and also wonderfully under-performant when traffic on my site is heavy. I still run an EC2 instance on AWS that I configured years ago to host some of my side projects. If you don't care about actually destroying the data on the disk, you can probably do something like dd if/dev/urandom of/dev/sdc bs1M count2 to fry the first couple of megabytes (which would include the MBR and partition table).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |