Where are info document files in Mac or in Linux, and how can I install some missing info files?

半世苍凉 提交于 2019-12-06 09:24:08

I suppose you entered info coreutils on the command line, which returned the info top directory instead of the coreutils info page? In that case, here is what I would do (on ubuntu 15.10, and probably on any GNU/Linux OS).

Download the coreutils info document from the gnu project:

wget http://www.gnu.org/software/coreutils/manual/coreutils.info.tar.gz 

Extract the (compressed) tar archive that you downloaded:

tar xf coreutils.info.tar.gz

Re-compress the resulting info file:

gzip coreutils.info

Prepare the resulting file with the right attributes:

chmod 644 coreutils.info.gz
sudo chown root:root coreutils.info.gz

and move it into the info directory:

sudo mv coreutils.info.gz /usr/share/info

Now, the command

info coreutils

should work.

If you want to have a hypertext link to coreutils in the info top page then do:

sudo install-info --info-dir=/usr/share/info --info-file=/usr/share/info/coreutils.info.gz

I find this somewhere that I do not know where it was.

strings `which info` | grep /info

This would print out some default info directories that had been compiled with the info command. One can also export a shell variable called INFOPATH with info directories you want.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!