Preciso rodar / usr / libexec / makewhatis, para usar o whatis

0

Por favor, ainda sou novo no unix. Estou aprendendo no momento. Estou usando o Ubuntu 16.04LTS em uma máquina virtual (oracle). Eu quero tentar o comando 'whatis', mas o livro que estou lendo diz isto: -

Before running whatis the first time on your system — particularly if you’re running a standalone machine using FreeBSD, Linux, or Darwin — you’ll want to run the makewhatis at /usr/ libexec/ makewhatis, which creates the whatis database by scanning the command names from the existing manpages.

Eu tentei executar /usr/libexec/makewhatis , eu tenho isso

bash: /usr/libexec/makewhatis: no such file or directory

Eu tentei fazer sudo apt install makewhatis , eu consegui isso, depois de ler listas de pacotes, construir árvore de dependência, ler informações de estado

E: Unable to locate package makewhatis

Quando eu fiz whatis cat , obtive o resultado que esperava. Por favor, eu só quero saber se não preciso executar /usr/libexec/makewhatis , no meu sistema, para usar o que é a primeira vez, e está tudo bem.

    
por Evan 31.05.2017 / 23:25

2 respostas

1

/usr/libexec não existe no Ubuntu por padrão. Daí o erro é adequado. Seu livro pode estar um pouco desatualizado. Para citar este artigo :

Enter makewhatis. This command creates the whatis database files used by both apropos and whatis. They are located in each ../man directory and catalog the manual files in each of the individual cat? and man? subdirectories.

Se você ler o manual de whatis , verá que não é necessário fazer mais em sistemas modernos (ênfase adicionada):

index databases are used during the search, and are updated by the mandb program. Depending on your installation, this may be run by a periodic cron job, or may need to be run manually after new manual pages have been installed.

    
por Sergiy Kolodyazhnyy 01.06.2017 / 03:16
0

Para o Ubuntu 16.04 não é necessário executar o

/usr/libexec/makewhatis

comando, apenas execute o comando

whatis cat

whatis cat tem o mesmo resultado que man -f cat

    
por GamaMTZ 01.06.2017 / 00:14