Posts tagged ‘delete’

Bash tip: Selective Deletion

terminal.png

If you have a directory that contains ten subdirectories and you want to delete three of them, the slow way to do it would be like this:

rm -rf /home/tuxtraining/work
rm -rf /home/tuxtraining/projects
rm -rf /home/tuxtraining/sandbox

But that’s pretty darn slow and open to making mistakes – a much smarter way to is to let Bash perform multiple filename expansion by placing the options inside braces. For example, this would achieve the same as the three lines from above:

rm -rf /home/tuxtraining/{work,projects,sandbox}

Delete Files Permanently & Securely with Shred & SecureDelete

terminal-glossy.jpg

We all know that when you simply delete a file, it’s possible to recover it later. Sometimes this is useful, if you accidentally delete something important; but usually this is a problem, and you really want that file gone forever. This howto will explain how to delete a file in linux securely and permanently, so it can never be recovered.

Hard drives store data magnetically; when you delete a file in Linux (on the ext3 filesystem), that area of the hard drive (the “inode”) is overwritten with zeros (this isn’t the case with the older ext2 filesystem, or with the Windows filesystems; see the section below on “passes and filesystems”), but the magnetic traces of that section’s previous contents remain lingering until it is overwritten many times. These tools work by writing lots of random data and zeros over your old file[s], making sure that even the most advanced recovery methods aren’t able to read what was once stored in that part of the hard disk.

Continue reading ‘Delete Files Permanently & Securely with Shred & SecureDelete’ »