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

Re: Auto-emptying of trash.



Sharon Kimble wrote:
> Thanks, after repopulating .trash with files suitable for deleting, i was
> able to test it out. And    ' find $HOME/.local/share/Trash -type f -mtime
> +7' did find one file, which i was then able to delete by running the same
> command again with '-delete' at the end.

Yay!  :-)

> I now see in .trash that there are two directories, one dated 8th February,
> and one dated 16th February which should be eligible for deletion. 

The top two directories "files", and "info" will always be created and
those will always be new.  If those are the two you see then I would
simply leave those.  It is subdirectories that are more interesting.

> Except, if you go by its properties date, it was last accessed
> 3/3/13, which means that its not deletable until the 10th. Is that
> correct please?

You say "properties" making me think you are using a graphical file
manager.  That's fine.  But often those make things too simple.
Usually they hide too much.  And they make it impossible to concisely
show us what you are seeing.

Instead could you show us the output using shell command line tools?
Open a terminal window and run the commands.  Then cut and paste the
output from the commands back for us to see.  Using 'ls -l' is good.
Or there are other ways such as the find -ls option.  Or 'stat'.  But
'ls -l' is good.

Really when deleting these files the access time is most interesting.
But these days many people turn atime off!  It isn't available then.
If you don't turn it off then atime might be a better choice than
mtime.

When files are put into the trashcan what timestamps (if any) are
updated?  I wonder if a file could be put in the trash and immediately
be a candidate due to having been old before and not modified when it
was put in the trashcan.  That might cause the emptytrash script to
immediately delete it.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: