what is the 'whatis' command?

I am kind of new with Unix and I really need some help. Can you please tell me what the 'whatis' command is? and what does it do?

Let's say that I have a file which I want to delete, what command will I need to use?

If I have a directory that I want to delete all files from what command do I use?

What is the difference from deleting a directory, and deleting a directory and all its subdirectories beneath it? What command do I need to use?

Thankx,

whatis - describes what function a command performs...
To find out what the ls command does, enter:
whatis ls

This produces the following output:
ls(1) -Displays the contents of a directory.

rm - deletes a file or a directory.
To delete a file...
rm myfile

To delete a directory...
rm -r mydir

Reading the man pages will give you this information
and much more...

man whatis
man rm

Thank you rwb1959.

And there's always:
whatis whatis

I could not find this whatis in HP-Unix B 11. and can anybody tell me the difference between man and whatis ?

HP-UX picked up the old System V man command back in the early 80's and they don't seen to want to change. HP's man stuff is a little weird because of it. HP is missing both the whatis and apropos commands. But you can get them back with simple aliases:

alias whatis="man -f"
alias apropos="man -k"

I only got error when I tried them. Is that because of Installation problem?

$ man -k ls
/usr/share/lib/whatis: No such file or directory
$ man -f ls
/usr/share/lib/whatis: No such file or directory

You need to run "catman -w" to build the database to get -f and -k to work.

sorry again, when i gave

catman -w

I got

stdin: not in compressed format
stdin: not in compressed format
/usr/lbin/mkwhatis[108]: /usr/share/lib/whatis: Cannot create the specified file.
chmod: can't access /usr/share/lib/whatis

Is there anything I can do ?:frowning:

First, just ignore the "not-compressed" messages. They come from uncompress. Somehow HP has a couple of man pages that will not compress...I'm tempted to track them down just to see how to write a non-compressable man page.

Those last two messages probably means that you were not running as root. If you were running as root, then somehow /usr/share/lib was not writable by root.

I am not the root, just an ordinary user. Should I need to inform the superuser regarding this?

Yes, you should inform the superuser and let him know. It is a very usefull utility.