Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to clear all the user's trash by one command
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 183

PostPosted: Mon Dec 17, 2012 10:05 am    Post subject: how to clear all the user's trash by one command Reply with quote

Last night I my root partition space run out, I use empty-trash to deleted 75G trash file.

I think the procedure is complicate:
1. I run empty-trash as root, but i found only root's trash is cleared
2. then I must run empty-trash as fpemud to clear fpemud's trash

If there's many users on this machine, then I must clear their trash one by one?
Is there a method to clear all the user's trash by one command? should this func be add to trash-cli?
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4064
Location: Irgendwo im Nirgendwo

PostPosted: Mon Dec 17, 2012 11:22 am    Post subject: Reply with quote

The Trash should be located at $XDG_DATA_HOME/Trash. If it is not set (which I assume) it defaults to $HOME/.local/share.
So something like
Code:
rm -rf /home/*/.local/share/Trash/*

should work for you.
_________________
"der mac dennoch wesen geil"
Wolfram von Eschenbach, Parzival (Buch 1, Z. 7).
Ein frühes Statement gegen Windows.

My overlay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum