Saturday, March 17, 2012

Trash commands & shortcuts

To delete a file completely without putting it into the Rubbish Bin, select and use Shift-Del.

To create a command to empty trash basket and then a shortcut for that command, first find where is your trash folder (in current Xfce the deleted files go to /home/username/.local/share/Trash/files).

To create a bash file for the purpose:
gksudo gedit /usr/local/bin/emptytrash


Paste inside:
#!/bin/bash
rm -rf /home/username/.local/share/Trash/files/*

Make this file executable:
sudo chmod +x /usr/local/bin/emptytrash

To empty trash in terminal:
emptytrash

You may create a shortcut for that - in current Xfce : Settings Manager/Keyboard/Applications Shortcuts: Add

No comments:

Post a Comment