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

348 views Asked by At

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

2

There are 2 answers

0
Johannes Huisman On

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
0
Sangcheol Choi On

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.