[Klug-general] Auto trash emptying?
Sharon Kimble
boudiccas at talktalk.net
Mon Mar 4 13:52:08 UTC 2013
On Mon, 04 Mar 2013 10:47:48 +0000
Paul Littlefield <info at paully.co.uk> wrote:
> On 03/03/13 21:57, Sharon Kimble wrote:
> > This partly works but is very inefficient in that it
> > doesn't delete everything that is available to be deleted, just
> > tends to leave stuff with no apparent reasoning.
>
> Can you "create" some files and then delete them so you can show us
> exactly what you mean?!
>
> :)
>
trash:///Subtitles, and when its deleted it shows as 'find:
`/home/boztu/.local/share/Trash/files/Subtitles': No such file or
directory' in the txt output. This shows that its been deleted
successfully. It seems that if its less than 7 days old, then its not
deleted, which is the desired outcome.
There are currently 2 files that have not been deleted, even though
their shown date is 27/2, and one whose date is 26/2.
The script is currently
################################################
#!/bin/sh
# emptyTrash
DAYS=7 # retain for N days
find $HOME/.local/share/Trash/ -type f -mtime +$DAYS -delete
find $HOME/.local/share/Trash/ -depth -type d -exec rmdir
--ignore-fail-on-non-empty {} +
#################################################
Thanks all :)
Sharon.
--
A taste of linux = http://www.sharons.org.uk/taste/index.html
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian Wheezy, LXDE 2, LibreOffice 4.0.0
Registered Linux user 334501
More information about the Kent
mailing list