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

Re: Exiting man pages display



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'.

BTW - Another good keyboard shortcut to know is the Control-C,
which tries to terminate the current process (as opposed to a
simple "stop").  This requires some minimal feedback from the
process, so hung processes may not respond to this and need
the Control-Z, kill treatment, but it is a better first tack.

	- Kevin Colby
	  kevinc grainsystems com



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