ITADN

Pass dir to trash-empty

#367Closeduli42 创建于 2025-07-24
U
uli42commented
We have Petabytes of project dirs that are accessed via NFS. These dirs are mounted on demand using autofs. Users delete files on those shares via an XDG aware filemanager and they pile up in .Trash-<uid> dirs. AFAIU any automation of emptying the trash would be a client side procedure and has to run in the user's context. Which is problem when a user does not access the project anymore (and thus it is not mounted) e.g. because it is closed or the user is working on other project or has left the company. So we need a procedure to cleanup on the server side. With trash-list --trash-dir <dir> we can list the files in a Trash dir. Using this output we could build a list of "old" deletions and remove them server side. But this should not be necessary because there's trash-empty, which is supposed to do just that. Unfortunately it does not know the --trash-dir parameter. So for me it is unclear how trash-empty identifies possible trash dirs. I suggest to add --trash-dir to trash-empty, allowing us to empty any trash directory from the command line on the server.
关闭于 2025-07-24 1 条评论