默认情况下安装/etc/cron.weekly/fstrim: (由https://unix.stackexchange.com/a/254840/92199确认)
对我来说不幸的是它一直在产生
/etc/cron.weekly/fstrim:
/etc/cron.weekly/fstrim: 10: exec: fstrim-all: not found
run-parts: /etc/cron.weekly/fstrim exited with return code 127失败(通过本地邮件传递)。
我有一个SSD,所以我倾向于避免仅仅删除这个任务。
我找到那个fstrim-以前都在包中,但是我已经安装了它(无论如何在异种的它不见了中)。
mateusz@grisznak:~$ sudo apt-get install util-linux
[sudo] password for mateusz:
Reading package lists... Done
Building dependency tree
Reading state information... Done
util-linux is already the newest version (2.27.1-6ubuntu3.6).此工具不仅在cron环境中失败:
mateusz@grisznak:~$ fstrim-all
fstrim-all: command not found我的系统版本:
mateusz@grisznak:~$ uname -a
Linux grisznak 4.15.0-43-generic #46~16.04.1-Ubuntu SMP Fri Dec 7 13:31:08 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux如何使fstrim正常工作?或者也许删除这个任务是可以的,尽管我有SSD?
发布于 2019-01-24 11:23:47
我的16.04系统上的/etc/cron.weekly/fstrim文件包含以下内容:
#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true这将指定fstrim二进制文件的绝对路径,并使用--all选项。还不清楚您的版本有何不同,尽管它与我在14.04安装中找到的文件相匹配。
https://askubuntu.com/questions/1112455
复制相似问题