Sunday, September 19, 2010

How to Properly Delete a Drive

Shred is a Unix command that can be used to securely delete files and devices so that they can be recovered only with great difficulty with specialized hardware, if at all1. It is a part of GNU Core Utilities.

Erasing a file usually only erases the file system entry and keeps the content of the file intact. This frequently allows the file to be recovered using commonly available software. Even if the file is overwritten, residual magnetic fields may allow data recovery using specialist hardware equipment.

To prevent this, shred overwrites the file multiple times using patterns chosen to maximize destruction of the residual data. The articles data erasure and data remanence have additional information.
Source: Wikipedia

To use shred in a terminal type:
sudo shred -vfz -n 3 /path to drive

This command is dangerous as it makes your files unrecoverable. Make sure you know what you are doing.

The -vfz part:
v, --verbose show progress
f, --forces change permissions to allow writing if necessary
z, adds a final overwrite with zeros to hide shredding

The -n 3 part:
Overwrite the disk 3 times, the default is 3
You can change the number depending on how thorough you want to delete your data. The more overwrites the longer the process. If you're really paranoid 10 will shred it for sure plus a couple more times.

The /path to drive is the most important. Make sure you have the correct path to your drive.

To list all drives currently connected to your PC in a terminal type:
sudo fdisk -l

Saturday, September 4, 2010

Thunar Dropbox

Thunar Dropbox is a plugin that adds context-menu items from dropbox into the Thunar file manager.

You can find a installation .deb on maato's softwarebakery site.

For help installing Dropbox in xfce read my guide.

Friday, September 3, 2010

Add A User To A Group

In a terminal with root/super user privileges:

adduser username group

For example I wanted to add myself to the groups lp sys & lpadmin to remove a old HP print driver I had installed.

red@red-desktop:~$ sudo adduser red lp
Adding user `red' to group `lp' ...
Adding user red to group lp
red@red-desktop:~$ sudo adduser red sys
Adding user `red' to group `sys' ...
Adding user red to group sys
red@red-desktop:~$ sudo adduser red lpadmin
Adding user `red' to group `lpadmin' ...
Adding user red to group lpadmin