LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to restore /usr/share/info/dir file (https://www.linuxquestions.org/questions/linux-general-1/how-to-restore-usr-share-info-dir-file-428600/)

ptmono 03-26-2006 05:15 AM

How to restore /usr/share/info/dir file
 
Code:


[root@localhost elib-1.0]# install elib.info /usr/share/info/dir

Above command change my /usr/share/info/dir file so that my info page loss the original info page.

How can I fix this problem?

Thanks.

Speek 03-26-2006 05:39 AM

cd /usr/info
rm dir
for f in * ; do install-info $f dir ; done

ptmono 03-26-2006 03:03 PM

Thanks.

My mistake is to change /usr/share/info/dir file with 'install elib.info /usr/share/info/dir' command. This command replaced the dir file as elib.info file.

I am using emacs as major editor. 'C-h i'(Info-directory-list) command show me the whole info page. But now I cannot see the whole tree of info page(top level dir menu). Just can see 3 info page.

How can I restore this dir file back?

How can I reinstall the info package(?) to restore the dir file?

I need 'info-directory-list' on emacs. It is very useful to me.

Thanks.

ptmono 03-26-2006 04:58 PM

This work is completed.

My fedora core 4 has totally 3 dir file. /usr/share/info/dir, /usr/local/info/dir, /usr/info/dir. To add all directory of info file in /usr/share/info/ to dir file I used 'install-info * dir' in /usr/share/info directory. But the result was bad.
Code:

[root@localhost info]#install-info * dir
install-info: excess command line argument `ada-mode.gz'
install-info: excess command line argument `am-utils.info-1.gz'
install-info: excess command line argument `am-utils.info-2.gz'
install-info: excess command line argument `am-utils.info-3.gz'
install-info: excess command line argument `am-utils.info-4.gz'
install-info: excess command line argument `am-utils.info-5.gz'
install-info: excess command line argument `am-utils.info-6.gz'
install-info: excess command line argument `am-utils.info-7.gz'
install-info: excess command line argument `am-utils.info.gz'
install-info: excess command line argument `annotate.info.gz'
install-info: excess command line argument `as.info.gz'
install-info: excess command line argument `auctex.info.gz'
install-info: excess command line argument `autoconf.info.gz'
install-info: excess command line argument `automake.info-1.gz'
install-info: excess command line argument `automake.info-2.gz'
install-info: excess command line argument `automake.info.gz'
install-info: excess command line argument `autotype.gz'
install-info: excess command line argument `bash.info.gz'
install-info: excess command line argument `bc.info.gz'
install-info: excess command line argument `bfd.info.gz'
install-info: excess command line argument `binutils.info.gz'
install-info: excess command line argument `bison.info.gz'
install-info: excess command line argument `cl-1.gz'
install-info: excess command line argument `cl-2.gz'
install-info: excess command line argument `cl-3.gz'
install-info: excess command line argument `cl-4.gz'
install-info: excess command line argument `cl-5.gz'
install-info: excess command line argument `cl-6.gz'
install-info: excess command line argument `cl.gz'
install-info: excess command line argument `configure.info.gz'
install-info: excess command line argument `coreutils.info.gz'
.
.
.

I guess why this message occurred.('install-info `ls -l |awk '{print $9}'` dir' command take also same result.) So I make the list of commands.
Code:

[root@localhost info]# ls -l |awk '{print $9}' > list
[root@localhost info]# sed 's/^/install-info /' > list2
[root@localhost info]# sed 's/$/ dir/' > list
[root@localhost info]# chmod 755 list
[root@localhost info]# ./list



All times are GMT -5. The time now is 12:06 PM.