Unix Tutorial


What is Unix?

Getting started

Hardware

Software

Basic Commands

vi Commands

 

Files

File Commands

Different types of file

File Redirection

Permissions

Pipelines / Filters

 

Directory

Directory Structure

Directory Command

Shell

Different types of shell

Compiling Program

Networking

Commands

Reference

Reference Commands

Online help : Manpages

Useful links/Books

 

Search Engine

Using the On-Line Manual Pages


Unix comes with a large, built in manual that is accessible at any time from your terminal.

The online manual is a collection of file, stored on disks, each of which contains the documentation about one Unix command or topic.You can access the online manual at any time by using the man command.T ype the word man,followed by the name of the command you want to know about.Unix will display the documentation for that command.For example to display the documentation about the cp command, enter :

%man cp

The man command is the single most important Unix command because you can use it to learn about any command you want.Type

%man man

If you want ,you can specify more than one command name,like type

%man cp mv ls

Unix will display the documentation for each command in turn.

After typing man cp and pressing , note how man displays a screenful of text and then waits with a prompt --More-- at the bottom of the screen. What man is doing is sending everything it wants to display on the screen through a program known as a "pager." The pager program is called more. When you see --More-- (in inverse video) at the bottom of the screen, just press the space bar to see the next screenful. Press <CR> to scroll a line at a time.

--More--(25%)

This means that there is more to come and you have read 25 percent of the data.

A quick way to find out what a command does: man

%whatis time date

you will see something like this

date (1) -print date and time

time(1) -time a command

time(7) -time a command

time, ftime (3) -get date and time

Note: For the whatis command to work properly, man pages must be preprocessed in a certain way.All the one-line descriptions are collected and stored in a certain files.It is these files that the whatis command searches, not the actual manual.Unless the preprocessing has been carried out, the whatis command will not be able to return useful information.

Searching for a command: apropos

When you want to learn about a command, you can use man to display the appropriate manual page.But what if you know what you want to do, but you are not sure which command to use?.

The solution is to use man with the -k option to search for commands whose descriptions contain specified keywords.For example, say that you want to find all the entries in the online manual that have something to do with the manual itself. Type

%man -k manual

As a convenience, you can use the single word apropos instead of man -k

%apropos manual

Note: For the apropos command to work properly, man pages must be preprocessed in a certain way.All the one-line descriptions are collected and stored in a certain files.It is these files that the apropos command searches, not the actual manual.Unless the preprocessing has been carried out, the apropos command will not be able to return useful information.