Suppose you made a directory that you thought you needed called penguin. As it turns out, you don’t need penguin at all, but due to a brief brain fart you’ve forgotten how to remove directories. Unfortunately, we haven’t yet progressed to the point where you can tell your computer ‘remove that directory’. We have to know what command to type.
Luckily for us, Linux® has a command that will help us find the command we need. It is called apropros. If we try:
Alpha:~ computerlamp$ apropros directory
That gives us a list of every man page on the system that has something to do with directory. Luckily for us, the command uses the more or less command for the output of apropros so we can look through the results and find the command that will remove the directory. Which, as we know from a previous post, is rmdir.
As Linux® always has another way to do things, there is another way to search through man pages. In this case, it is a flag for man, man -k. It will give the same results as apropros.
Alpha:~ computerlamp$ man -k directory
Sometimes apropos finds nothing. Try
Alpha:~ computerlamp$ apropos penguin