[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Auto-emptying of trash.



Sharon Kimble wrote:
> Thanks for this, and I've tried it out but its still not deleting files, as
> I output it to a txt.file which still remain empty.

Please say more.  It works for me.  You say it isn't deleting files
for you.  It is possible the permissions will prevent you from
deleting files but in that case there should be errors from the
command.  Please provide an example.

Start with this:

  find $HOME/.local/share/Trash -type f -mtime +7

If that prints files then adding the -delete option will delete them.
Honest! :-)

You say it isn't deleting files.  Pick a file that you think it should
delete but isn't deleting.  Show the file and the permissions of the
directory holding that file.  The permissions of the directory is the
important detail about creating or deleting files.

  ls -ld $HOME/.local/share/Trash/files/foo
  ls -ld $HOME/.local/share/Trash/files

I think that there simply are not any files old enough to need to be
aged away.  I think all of the files are current.  Since they are
current they do not meet your +7 days of mtime age that you originally
requested.  A +7 mtime age for trash files seemed reasonable to me.

> There is a programme, ported from ubuntu, called 'autotrash' in the repos.
> And although I've set it up as per its man page, but its output remains at
> zero, and not working.

Probably for the same reason.  Probably because the files are all
current and none of them old enough, past your seven day threshold, to
be candidates to be aged away.

The 'find' command will be easier to debug.  I would use it first to
figure things out.  Understanding a simple command is much better than
not understanding a magical black box.

> Maybe I'm going about this from the wrong end?

You have help here on the mailing list for your problem.  If you make
good use of it then you can understand and solve your task.  There is
no need to give up so easily.  Stick to it! :-)

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: