LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Automatic Trash removal (https://www.linuxquestions.org/questions/linux-newbie-8/automatic-trash-removal-650966/)

kayza 06-22-2008 10:10 PM

Automatic Trash removal
 
I want to set up an icon for someone to be able to empty the trash of the drive he is in.

I know that I can set up an icon for any command file, but how could I go about creating the command file?

Thanks!

bigrigdriver 06-22-2008 10:34 PM

You download copies of "Absolute Bash-scripting Guide" and "Bash Beginners Guide" and study them. Shell scripting isn't all that hard unless you want something like a full featured application. For what you want, a simple script that steps through directories/folders with cd (change directory) commands, interspersed with commands to clear files along the way (something along the lines of '/dev/null > <filename>' where <filename> is the file to empty, and /dev/null > overwrites the file with nothing (literally), leaving an empty file behind in it's wake.

Once the file works when you run it from the command line, then you tie it to an icon on the desktop.


All times are GMT -5. The time now is 09:10 AM.