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

跟風遠走 提交于 2019-12-22 14:41:24

问题


I wanted read coreutils info, but I could not find it. Now, I wonder where the info documents in my computer (mac or linux). I want to know how I can install info files.

Thank you,

SangChul


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/18774045/where-are-info-document-files-in-mac-or-in-linux-and-how-can-i-install-some-mis

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