可以安排垃圾清理吗?

sou*_*gro 0 trash schedule

我想知道是否可以做到这一点,因为我必须在工作期间删除很多文件,而且我更喜欢在界面上执行此操作而不使用sudo rm,所以如果可能的话...如何?

例如,每周一次。

Rin*_*ind 5

有一个工具可以做到这一点:autotrash

\n
pip3 install --user autotrash\n
Run Code Online (Sandbox Code Playgroud)\n

(不再有 apt install)一个 cron 作业

\n
@daily ./home/rinzwind/.local/bin/autotrash -td 10\n
Run Code Online (Sandbox Code Playgroud)\n

每天会删除一次您的垃圾。删除-d超过 10 天的文件。添加-t将为所有用户删除。它还有更多功能(例如根据条目和文件大小或垃圾箱中当前可用的内容进行删除)。

\n

还有trash-cli

\n
sudo apt install trash-cli\n
Run Code Online (Sandbox Code Playgroud)\n

\n
@daily /usr/bin/trash-empty\n
Run Code Online (Sandbox Code Playgroud)\n

每天会删除垃圾一次。

\n
\n
$ pip3 install --user autotrash\nCollecting autotrash\n  Downloading autotrash-0.4.1-py3-none-any.whl (22 kB)\nCollecting arrow<0.18.0,>=0.17.0\n  Downloading arrow-0.17.0-py2.py3-none-any.whl (50 kB)\n     |\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88| 50 kB 2.2 MB/s \nRequirement already satisfied: python-dateutil>=2.7.0 in /usr/lib/python3/dist-packages (from arrow<0.18.0,>=0.17.0->autotrash) (2.8.1)\nInstalling collected packages: arrow, autotrash\n  WARNING: The script autotrash is installed in '/home/rinzwind/.local/bin' which is not on PATH.\n  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n
Run Code Online (Sandbox Code Playgroud)\n

和 ...

\n
rinzwind@discworld:~/.local/bin$ ./autotrash -td 10\nrinzwind@discworld:~/.local/bin$ \n
Run Code Online (Sandbox Code Playgroud)\n