I was trying to learn more about grep
(as my coworkers suggested) since I rarely used it and needed to refresh my Unix knowledge. However, when I typed man grep
, the following message was displayed:
No manual entry for grep
This occurred for many commands, each stating that there is no manual entry for that particular command.
I was wondering if there was a way to view all man pages (or at least their titles)? I want to know if perhaps there are no man pages on this machine.
Thanks!
Clarification: I am not using a regular distribution of Unix. I don't have Ubuntu or anything like this. The man command is there, but no manual pages seem to exist. Someone (I do not know who) installed this version of Unix a long time ago on this machine.
Clarification 2
I am not interested in manual pages themselves; I know I can google them. I want to know, however, if there are man pages installed on this machine.
Attempted Solutions
man -dD
: Response was What manual page do you want?
man -k
: Response was apropos what?
4 Answers
Try doing the 'man grep' command on another server, preferrably a test or dev server. Our sysadmins OFTEN de-install the man pages for space and security reasons on our production servers.
If you are NOT a sysadmin, there is little you can do to tell whether the man pages are installed on most UNIX servers besides just looking for them. A few common locations to see if they are enven installed are:
/usr/share/man
/usr/local/man
/usr/lib/man
A life-saver for me was a book entitled: "Unix in a Nutshell" published by OReilly. It has a lot of information on many of the UNIX command utilities.
Good luck.
-
Indeed those three folders were empty (or rather contained empty folders). Thanks for your help!– Nathan SabrukaJul 20, 2012 at 15:35
Sounds like the man pages were not installed.
Assuming you can't reinstall the man pages you could read them online: http://man7.org/linux/man-pages/dir_all_alphabetic.html
-
1How would I know if the man pages are not installed?– Nathan SabrukaJul 20, 2012 at 15:29
-
1Look in /usr/share/man /usr/local/man /usr/lib/man. If they're all empty they're not installed.– prospectofdeathJul 20, 2012 at 15:32
man -k
That should list all available man
pages on your system. The following page may also be of use to you. It's the linux man page for grep, so not quite sure why it's not visible to you on your system.
-
When I type "man -k", I get the response "apropros what?". Do you know what this means?– Nathan SabrukaJul 20, 2012 at 15:23
man -dD
Will display where your man pages are installed. Look into those directories and you'll see each man page file listed (e.g. ping.8.gz for ping).
-
I tried that, and all I got was "What manual page do you want?" in response...– Nathan SabrukaJul 20, 2012 at 15:23
-
1Then your man configuration thinks there are no man pages installed. We would need more info on your setup to fix. Might be more appropriate for ServerFault.– Matt SJul 20, 2012 at 15:34
uname -a
?