[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Exiting man pages display



Kevin Colby wrote:
> 
> Dom Bekarge wrote:
> >
> > Newbie question:
> > How does one exit a man page gracefully?
> 
> Cute question.
> 
> > I typed
> > man ls
> > and got the man help screens regarding the ls command.
> >
> > The screens moved forward when I pressed the Enter or Spacebar keys.
> > At the end of the man pages for ls, the bottom line of the screen showed
> > (EXIT)
> > in reverse video highlight.
> >
> > Some experimentation showed two ways to exit the man pages:
> >
> > 1.  Ctrl+Alt+Del, but this shuts down the system.
> 
> Bad idea.
> 
> > 2.  Ctrl+Z
> 
> Not-quite-so-bad an idea.
> Control-Z is a shortcut for "Stop Process".
> 
> > After reading several different man pages, I noticed that Ctrl+Z
> > would return me to the command prompt, but a counter would appear
> > like
> > [1]+
> >
> > and the next time
> > [2]+
> >
> > and so on.
> >
> > What is this counter?
> >
> > Does the counter suggest that I am stacking processes or shells
> > similar to MS-DOS command /c ?
> 
> Sort of.
> These are the process reference numbers for your stopped processes.
> Man 'ps', 'kill', 'fg', and 'bg' to learn more about working with
> processes.  'ps' shows you lists.  'kill' is, well, rather obvious.
> 'fg' and 'bg' are for foregrounding and backgrounding processes.
> 
> > Am I exiting the man pages properly?
> 
> No.
> 'man' is actually 'less', which is actually modeled on 'more'.
> Man either less or more for cute tricks you can do while reading
> a man page like searching and backing up.  To quit, try 'q'.

man is a program. A close approximation would be:

search $MANPATH for the command and set $MANFILE
nroff -man $MANFILE |$PAGER

man pages use a set of formating macros (the an macros)
and are stored in the man directories.
like /usr/man/manx/command.x (where the x is a number)

the man program can also search/show a certian section
since some things are in more than one section.
like kill(1) the program , and kill(2) the C function.


see the man page for man (type "man man") for more.

	-Thomas



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]