Jump to content

Emptying the trash


ichase

Recommended Posts

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

Link to comment
Share on other sites

securitybreach

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.archlinux.org/index.php/PCManF..._not_working.3F

Link to comment
Share on other sites

securitybreach

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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

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.
Link to comment
Share on other sites

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:
Link to comment
Share on other sites

securitybreach
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. :' />
Link to comment
Share on other sites

V.T. Eric Layton
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:
BLASPHEMY!!!!!!!!!!!!!!!!! :hysterical: :' /> :' /> :' /> :thumbsup:
HAHA! :rolleyes:
Link to comment
Share on other sites

securitybreach

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.net/index.php?option=co...01&Itemid=9 and http://en.wikipedia.org/wiki/Magic_SysRq_k...and_line_access

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...