我无意中(鲁莽地)删除了rm -rf
我的/usr/share/fonts/truetype
目录。我所有的 TrueType 字体现在都消失了。:/ 有什么办法可以找回它们吗?我在 Ubuntu 16.04 上。
答案1
只是经历了这个与另一个用户一起访问不同的目录。您可以查看哪些包在目录中有文件。就我而言:
$ dpkg -S /usr/share/fonts/truetype | cut -sd: -f1 | tr -d , | fold -w80
fonts-opensymbol ttf-mscorefonts-installer ttf-ubuntu-font-family fonts-symbola
fonts-liberation fonts-freefont-ttf fonts-droid-fallback fonts-dejavu-core
我们可以将其完善为一个命令,只需重新安装所有这些包:
sudo apt install --reinstall $(dpkg -S /usr/share/fonts/truetype | cut -sd: -f1 | tr -d ,)
这样做的好处是你可以根据你的包。
答案2
我生成了包含每个目录的软件包的列表我的 /usr/share/fonts/truetype
。(我没有删除我的字体)。重新安装(使用sudo apt-get install --reinstall <package> <...>
:
w3@aardvark:~(0)$ for i in /usr/share/fonts/truetype/* ; do
> dpkg -S $i
> done
fonts-sil-abyssinica: /usr/share/fonts/truetype/abyssinica
fonts-ancient-scripts, fonts-symbola: /usr/share/fonts/truetype/ancient-scripts
fonts-gfs-artemisia: /usr/share/fonts/truetype/artemisia
fonts-gfs-baskerville: /usr/share/fonts/truetype/baskerville
fonts-gfs-bodoni-classic: /usr/share/fonts/truetype/bodoni-classic
fonts-dejavu-extra, fonts-dejavu-core: /usr/share/fonts/truetype/dejavu
fonts-gfs-didot: /usr/share/fonts/truetype/didot
fonts-gfs-didot-classic: /usr/share/fonts/truetype/didot-classic
fonts-droid: /usr/share/fonts/truetype/droid
fonts-font-awesome: /usr/share/fonts/truetype/font-awesome
fonts-guru-extra: /usr/share/fonts/truetype/fonts-guru-extra
dpkg-query: no path found matching pattern /usr/share/fonts/truetype/fonts-japanese-gothic.ttf
fonts-freefont-ttf: /usr/share/fonts/truetype/freefont
fonts-gfs-gazis: /usr/share/fonts/truetype/gazis
fonts-sil-gentium: /usr/share/fonts/truetype/gentium
fonts-sil-gentium-basic: /usr/share/fonts/truetype/gentium-basic
fonts-horai-umefont: /usr/share/fonts/truetype/horai-umefont
fonts-kacst: /usr/share/fonts/truetype/kacst
fonts-kacst-one: /usr/share/fonts/truetype/kacst-one
fonts-lao: /usr/share/fonts/truetype/lao
fonts-lato: /usr/share/fonts/truetype/lato
fonts-liberation: /usr/share/fonts/truetype/liberation
fonts-lohit-guru: /usr/share/fonts/truetype/lohit-punjabi
fonts-lyx: /usr/share/fonts/truetype/lyx
dpkg-query: no path found matching pattern /usr/share/fonts/truetype/msttcorefonts
fonts-nanum: /usr/share/fonts/truetype/nanum
fonts-gfs-neohellenic: /usr/share/fonts/truetype/neohellenic
fonts-gfs-olga: /usr/share/fonts/truetype/olga
fonts-opendin: /usr/share/fonts/truetype/opendin
fonts-opensymbol: /usr/share/fonts/truetype/openoffice
fonts-sil-padauk: /usr/share/fonts/truetype/padauk
fonts-gfs-porson: /usr/share/fonts/truetype/porson
fonts-lklug-sinhala: /usr/share/fonts/truetype/sinhala
fonts-gfs-solomos: /usr/share/fonts/truetype/solomos
fonts-takao-pgothic: /usr/share/fonts/truetype/takao-gothic
fonts-gfs-theokritos: /usr/share/fonts/truetype/theokritos
fonts-tibetan-machine: /usr/share/fonts/truetype/tibetan-machine
fonts-tlwg-waree-ttf, fonts-tlwg-umpush-ttf, fonts-tlwg-typo-ttf, fonts-tlwg-typist-ttf, fonts-tlwg-typewriter-ttf, fonts-tlwg-sawasdee-ttf, fonts-tlwg-purisa-ttf, fonts-tlwg-norasi-ttf, fonts-tlwg-mono-ttf, fonts-tlwg-loma-ttf, fonts-tlwg-laksaman-ttf, fonts-tlwg-kinnari-ttf, fonts-tlwg-garuda-ttf: /usr/share/fonts/truetype/tlwg
ttf-bitstream-vera: /usr/share/fonts/truetype/ttf-bitstream-vera
ttf-dejavu-extra, ttf-dejavu-core: /usr/share/fonts/truetype/ttf-dejavu
ttf-indic-fonts-core: /usr/share/fonts/truetype/ttf-indic-fonts-core
ttf-marvosym: /usr/share/fonts/truetype/ttf-marvosym
ttf-xfree86-nonfree: /usr/share/fonts/truetype/ttf-xfree86-nonfree
ttf-ubuntu-font-family: /usr/share/fonts/truetype/ubuntu-font-family
fonts-unfonts-core: /usr/share/fonts/truetype/unfonts-core
ttf-unifont: /usr/share/fonts/truetype/unifont
fonts-wqy-microhei: /usr/share/fonts/truetype/wqy
w3@aardvark:~(0)$