Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, I can read the manual pages of bash by:

$ man bash

or

$ info bash

But there is also /usr/share/doc/bash which contains other related documents. When I looking into the docs of ECB (emacs code browser), in /usr/share/doc/ecb/html, is there any program find the html for me? For example I can type

$ htmldocs ecb

instead of

$ cd /usr/share/doc/ecb/html
$ firefox ...
share|improve this question
up vote 3 down vote accepted

Each application is responsible for providing their own tool for reading the docs in /usr/share/doc. There is no universal mechanism for handling it.

share|improve this answer

I'm quite late, but I thought I'd add my input: if your goal is to have some command like

htmldocs some/path/or/file

you can write your own script inside a personal scripts folder, e.g., /usr/utils, add that folder to your PATH (in your .bashrc file - see What is .bashrc file?), and then just execute your personal command.

This way, I've been able to define my own scripts that do whatever I want, e.g.,

sprocs

my own command which runs

ps -ef | grep Server

so I can easily see what server processes are running on my machine.

An example of a script's contents would be like

#!/bin/bash
ps -ef | grep Server
echo "my message to output in terminal"
# etc...

and this file, call it 'sprocs' (no extension) or something, would be in the folder you made / any folder that is on your PATH, so you can just type 'sprocs' in your terminal, and it just works.

https://www.linux.com/learn/tutorials/284789-writing-a-simple-bash-script- describes how to get started with your own script. The #!/bin/bash is the standard first line that just lets your terminal access the commands. If you used python, it would be #!/usr/bin/python (assuming that's where python is installed).

Your case might have different commands like

#!/bin/bash
cd /usr/share/doc/ecb/html
firefox somefile.html
# etc...

If you wanted flexibility, you probably want to pass parameters, so you could check out http://floppix.ccai.com/scripts1.html for an example at the bottom.

(Even if you don't do this, it's definitely useful for running personal scripts from terminal that do exactly what you want.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .