LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-22-2008, 11:10 PM   #1
kayza
LQ Newbie
 
Registered: Apr 2008
Distribution: OpenSuSE 10.3
Posts: 1

Rep: Reputation: 0
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!
 
Old 06-22-2008, 11:34 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Removal bamfsnyder Linux - Newbie 4 02-28-2008 09:01 PM
Move to trash works beautifully, but empty trash .. different story. kd5eax Mandriva 2 12-04-2007 03:52 PM
Remove trash icon from desktop or change trash iscon cad Linux - General 7 02-27-2007 12:50 AM
removal invinciblegod Linux - Laptop and Netbook 3 06-06-2005 04:47 PM
I changed the trash can icons but now the full trash can icon doesn't show? Why? Ausar Linux - Newbie 6 08-04-2004 02:59 PM


All times are GMT -5. The time now is 02:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration