No .Trash on External USB Drives September 13, 2006Posted by Carthik in snippets, ubuntu.
Nautilus creates a .Trash-xxx directory on external USB drives when you delete something on them. Now this directory will take up space since it has a copy of the files you deleted. You sure can empty the “Trash” on the external USB drive immediately, but if you forget then it can annoy you at random. For example, after deleting all the files from my 256 MB USB drive, I took it to school, and no matter what I did I could not save new photos on the disk, since it was out of space. You may not be able to empty the “Trash” on another computer, especially if you have a different username on that computer. Also, in the past, items in the .Trash folder in external USB drives would cause the trash applet on my panel to show that it had files in it. Right clicking on it and emptying it would not cause the icon to get back to the the “empty” state.
You can fix all this by adding a “Delete” option in Nautilus that straightaway deletes your files without first putting them in the recycle bin (or Trash). After you enable this option, right clicking on a file in nautilus will give you two options “Move to Trash” and “Delete”. I use “Delete” for files on External USB Drives and this then prevents the .Trash-xxx folder from being created on the drives. Here’s how you can enable the “Delete” option. Open Nautilus, then go to the “Edit -> Preferences” option in the top menu. Then in the menu that shows, choose the “Include a Delete command that bypasses Trash”. That’s it, you’ve enabled the delete option.
If you often find yourself looking in Trash for files you have accidently deleted that you suddenly need, then be careful how you delete stuff! After enabling the option, using the “Del” key on the keyboard is a shortcut to move an item to Trash and “Shift + Del” instantly deletes the item without putting it in Trash. Of course, as I said before, for those of you who use the mouse more, right clicking on an item in Nautilus, or the desktop will now show you options for both ways of removing the item.