How To Delete Without Using The Trash


Karel Jansens

Active Member
Joined
Dec 21, 2007
Messages
679
Age
62
Location
Belgium, but trying to escape
Website
Visit site
I realize I´m quickly losing all remaining credit, but I have yet another problem.

The Thunar file manager has a trash can, which apparently everyone thinks is a Good Thing.

However...

The trash can files are located on the internal memory, which in my case is now less than 100MB. This means that almost everytime I try to delete a watched media file from my card, the system balks because there´s not enough room.

It would be fine if the system were to offer the option to permanently delete the file, but it just tries to delete until it can´t and then stops. To make things worse, it´s apparently not even possible to disable the trash can in Thunar (according to it´s faq), for which they unblushingly give as the reason that they want to protect the computer from stupid users (but who´s going to protect us from stupid, over-meddling developers, I wonder). In fact, the more I think about it, the stupider Thunar´s trash can gets: Who in their right minds would create an ´intelligent´ trash can and not account for the possibility of low available storage?

I don´t, I really don´t, want to use the console for deleting files; my media filenames are insanely complex and the tab key is made more difficult than it´s worth (who thought that up anyway? And WTF did I miss that in the discussions?!!).

So, will I need to install another file manager just to delete files permanently, or is there a way to easily invoke permanent deletion in Thunar that I have missed?

And just in case someone wants to be a smartie B) , creating a symlink for the trash files to a card would not be very smart either, as the card might not be there.
 
From the tweaks thread:

mindlord said:
Either shift will do. You can right-click the file, then hold shift, and click delete to bypass the trash bin.

I'm going to put this here:
To add a delete option to the right click menu in Thunar that by-passes the trash bin, and doesn't require you to hold shift or anything funny do the following:

1) Open thunar
2) Click Edit
3) Click Configure Custom Actions...
4) Click the green plus
5) Fill in the form:
name = Delete Permanently
description = Immediately delete the selected file(s) or folder(s), no questions asked, bypassing trash bin
command = rm -fr %F
5a) Assign an icon if you feel so inclined.
6) Click Appearance Options tab
7) fill in the form:
file pattern = *
8) Check all the boxes
9) Click OK
10) Click Close
11) Enjoy your new found file deletion powers.

If you want to go the extra mile you can create a shell script:
Code:
#!/bin/bash
zenity --question --text "rm selected files?"
if [ $? = 0 ]; then
   rm -fvr "$@"
fi
And assign it to the command line:
command = [path to script] %F
and now it will prompt you before clobbering the selected file(s) or folder(s).


:)

(Haven't tried this myself yet)
 
Last edited by a moderator:
I use the right-click, hold shift, and then click delete method, myself. Works perfectly. :)
 
Gruso´s custom action suggestion appears to be slightly less cumbersome than the «right-click, shift-click-delete» alternative. Still, I´d almost murder for it to be in the regular menus, with a decent keyboard shortcut (for some reason, I just hate to use the nubs in their mouse disguise).

Oh well, I´ll live. For now... ;)
 
I appreciate your woes and have not myself yet used the method Gruso linked. The shift delete business has been ok thus far.

As for TABing you clearly haven´t got with the F´n SWOOSH yet have you? ;)

Come on to the dance floor and... slide to the left for Capital A, slide to the right to TAB those fields away, cha cha cha, now criss cross for overclock to 800 thanks to Pleng and finger hop back to psx again. B)

Edit: I´ll get my coat and not because I´ve pulled :(
 
Back
Top