如何在不中断功能的情况下移动 ~/.fonts?

Abh*_*kar 4 fonts symbolic-link

我的分区剩余空间有限,我刚刚意识到我的~/.fonts文件夹将近 1GB。我应该如何将它移动到另一个分区而没有任何问题?

Ali*_*deh 9

是的,您可以将其移动到您想要的任何分区:

mv ~/.fonts /path/that/you/want
Run Code Online (Sandbox Code Playgroud)

然后编辑/etc/fonts/fonts.conf文件并将您的目录添加到此文件中:

sudo nano /etc/fonts/fonts.conf
Run Code Online (Sandbox Code Playgroud)

因此,将您的路径添加到该文件中的<!-- Font directory list --> 部分

    <dir>/usr/share/fonts</dir>
    <dir>/path/that/you/want</dir>
    <dir>/usr/local/share/fonts</dir>
    <dir prefix="xdg">fonts</dir>
    <!-- the following element will be removed in the future -->
    <dir>~/.fonts</dir>
Run Code Online (Sandbox Code Playgroud)

  • “不破坏功能?” 那么...为什么`mv`而不是`cp`,然后更改fonts.conf然后删除它?`mv` 可以“破坏功能”。 (5认同)