Jump to content


Emptying the trash


  • Please log in to reply
13 replies to this topic

#1 OFFLINE   ichase

ichase

    Chasing the Penguin

  • Forum MVP
  • 1,835 posts

Posted 16 September 2011 - 11:56 AM

To empty the trash in my Arch linux builds I type the following in terminal:
 # rm -rf /home/ichase/.local/share/Trash/files
This definitely works but was curious what others use.  I have been reading up on bash scripts that will automatically do this when you log out.  Aliases that can be created for example "emptytrash" that will technically do what I mentioned above with less typing.  I have even read about applications that can be installed that also take care of this for you.Some of your more elaborate distros have a "trash" folder like what you had in W!nD0w$.  Right click choose empty trash and "Poof" it's gone.  My Arch linux builds run very minimalistic so I don't have that and I don't want that.  :hysterical:  I keep an icon free desktop and I like it that way.  ;)So like I mentioned, this is an insignificant thing, but something that has to be done to conserve disk space so it is in essence a necessity.  With so many ways to complete the necessary task, I am curious as to how you all do it.  :)Enjoy the upcoming weekend folks.All the best,Ian
Ian Chase

Try Parted Magic The must have tool for any linux user's tool box.  (Contains Gparted, wifi support, Clonezilla, SuperGrubDisk/2, plop bootloader and more!!!)
CNI Radio

"I'm in repair.............I'm not together, but I'm getting there"
- John Mayer


Registered Linux User:  526317 10/22/2010
  Posted Image

#2 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,740 posts

Posted 16 September 2011 - 12:03 PM

I personally do not use a trash can either. When I use a graphical filemanager, I use pcmanfm and uncheck "Move deleted filed to "trash bin" instead of erasing from disk" in the preferences. Then I just hit the delete key and it deletes the file. That said, you can get the trash shortcut to work in pcmanfm using this https://wiki.archlin..._not_working.3F
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#3 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,740 posts

Posted 16 September 2011 - 12:06 PM

As far as an alias, you could add this to your ~/.bashrc:
alias empty='rm -rf /home/ichase/.local/share/Trash/files'
Then you can just type empty and hit enter to run that command. You can change empty to whatever you like.
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#4 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,441 posts

Posted 16 September 2011 - 12:53 PM

I RIGHT CLICK on the Trash icon on Thunar and choose "Empty Trash". It's a GUI thing. Don't tell anyone I do it that way, OK? :hysterical:

#5 OFFLINE   burninbush

burninbush

    Multithreader

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,278 posts

Posted 16 September 2011 - 01:41 PM

View Postichase, on Sep 16 2011, 08:56 AM, said:

To empty the trash in my Arch linux builds I type the following in terminal:
 # rm -rf /home/ichase/.local/share/Trash/files
Ian
Edit your command line above into whatever script runs at shutdown.  In slack it would be /etc/rc.d/rc.6 -- dunno anything about Arch, but it'll run some script when you tell it to shutdown.

#6 OFFLINE   ichase

ichase

    Chasing the Penguin

  • Forum MVP
  • 1,835 posts

Posted 16 September 2011 - 01:50 PM

View Postburninbush, on Sep 16 2011, 01:41 PM, said:

Edit your command line above into whatever script runs at shutdown.  In slack it would be /etc/rc.d/rc.6 -- dunno anything about Arch, but it'll run some script when you tell it to shutdown.
That is an interesting way of doing it I never thought about.  Might have to look into what script runs at shutdown in Arch.  The way I shut down in Arch is, I exit X to tty then
# shutdown -h now

View PostV.T. Eric Layton, on Sep 16 2011, 12:53 PM, said:

I RIGHT CLICK on the Trash icon on Thunar and choose "Empty Trash". It's a GUI thing. Don't tell anyone I do it that way, OK? :rolleyes:
BLASPHEMY!!!!!!!!!!!!!!!!!   :hysterical:  :">  :">  :">  :thumbsup: I use Thunar as well, but never recall seeing any kind of trash icon in it.
Ian Chase

Try Parted Magic The must have tool for any linux user's tool box.  (Contains Gparted, wifi support, Clonezilla, SuperGrubDisk/2, plop bootloader and more!!!)
CNI Radio

"I'm in repair.............I'm not together, but I'm getting there"
- John Mayer


Registered Linux User:  526317 10/22/2010
  Posted Image

#7 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,740 posts

Posted 16 September 2011 - 01:55 PM

View Postichase, on Sep 16 2011, 12:50 PM, said:

I use Thunar as well, but never recall seeing any kind of trash icon in it.
Did you install thunar-volman? https://wiki.archlin..._Volume_Manager
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#8 OFFLINE   SueD

SueD

    Posting Prodigy

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,476 posts

Posted 16 September 2011 - 02:39 PM

View Postichase, on Sep 16 2011, 12:50 PM, said:

That is an interesting way of doing it I never thought about.  Might have to look into what script runs at shutdown in Arch.  The way I shut down in Arch is, I exit X to tty then
# shutdown -h now
Can I ask why you exit X first? I've always got a terminal up anyways so once I close my browser and any other application I may have running, I just shutdown -h now in the terminal.Maybe I'm the one who's doing something wrong?  :hysterical:
Sue
Registered Linux User #433538
A life? Cool! Where can I download one of those?

#9 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,740 posts

Posted 16 September 2011 - 02:55 PM

View PostSueD, on Sep 16 2011, 01:39 PM, said:

Can I ask why you exit X first? I've always got a terminal up anyways so once I close my browser and any other application I may have running, I just shutdown -h now in the terminal.Maybe I'm the one who's doing something wrong?  :hysterical:
Well I never shutdown but when I reboot I just open up a terminal, su to root and type reboot. :">
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#10 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,441 posts

Posted 16 September 2011 - 04:12 PM

View Postsecuritybreach, on Sep 16 2011, 01:55 PM, said:

Did you install thunar-volman? https://wiki.archlin..._Volume_Manager
I have it in Slack, but can't remember if I installed it in Arch. Will have to check later tonight when I boot into Arch.Oh, and I halt my systems by using #telinit 0, which is the actual process that gets called when you type either #shutdown or #halt. We're such geeks. Whatever happen to Start Button --> Shutdown? :worthy:

View Postichase, on Sep 16 2011, 01:50 PM, said:

BLASPHEMY!!!!!!!!!!!!!!!!!   :hysterical:  :">  :">  :">  :thumbsup:
HAHA!  :rolleyes:

#11 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,740 posts

Posted 16 September 2011 - 04:23 PM

Well this works too:
# echo 1 > /proc/sys/kernel/sysrq# echo b > /proc/sysrq-trigger
The first command turns on sysrq and the second command shutsdown the machine immediately without asking or closing any apps.I would not suggest this unless your machine completely locks up or something.More info: http://www.nimblex.n...o...01&Itemid=9 and http://en.wikipedia....and_line_access
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#12 OFFLINE   ichase

ichase

    Chasing the Penguin

  • Forum MVP
  • 1,835 posts

Posted 17 September 2011 - 12:15 PM

View Postsecuritybreach, on Sep 16 2011, 01:55 PM, said:

Did you install thunar-volman? https://wiki.archlin..._Volume_Manager
I have both thunar-volman and gvfs installed.
Ian Chase

Try Parted Magic The must have tool for any linux user's tool box.  (Contains Gparted, wifi support, Clonezilla, SuperGrubDisk/2, plop bootloader and more!!!)
CNI Radio

"I'm in repair.............I'm not together, but I'm getting there"
- John Mayer


Registered Linux User:  526317 10/22/2010
  Posted Image

#13 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,740 posts

Posted 17 September 2011 - 12:20 PM

View Postichase, on Sep 17 2011, 11:15 AM, said:

I have both thunar-volman and gvfs installed.
Did you set it up via the wiki entry?
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#14 OFFLINE   ichase

ichase

    Chasing the Penguin

  • Forum MVP
  • 1,835 posts

Posted 19 September 2011 - 07:04 AM

Actually no.  I had aparently installed both thunar-volman and gvfs shortly after I did my install of Arch on the desktop months ago.  I never messed with it after that.  Once I get some time, I will give it a try.All the best,Ian

Edited by ichase, 19 September 2011 - 07:05 AM.

Ian Chase

Try Parted Magic The must have tool for any linux user's tool box.  (Contains Gparted, wifi support, Clonezilla, SuperGrubDisk/2, plop bootloader and more!!!)
CNI Radio

"I'm in repair.............I'm not together, but I'm getting there"
- John Mayer


Registered Linux User:  526317 10/22/2010
  Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users