[1.]
I would expect a list but all I get is: What manual page do you want?
-S
is not use to display list of sections, instead it ask you to pass list of section in your desired section search order. E.g.
xb@dnxb:/tmp$ man -S=7,6,5,4,3,2 ls
No manual entry for ls
See 'man 7 undocumented' for help when manual pages are not available.
xb@dnxb:/tmp$
The above-S=7,6,5,4,3,2
show that section search order start from left to right in this list. If manual of ls
contains section 7, it will show it. If not, it will try to search section 6, and so on. If no section exist in the end of this list, it will said "No manual entry for ls" even though section 1 exist. But this one works because section 1 in the list:
xb@dnxb:/tmp$ man -S=7,6,5,4,3,2,1 ls
xb@dnxb:/tmp$
Play around with this two to prove the search order of -S
is left to right:
xb@dnxb:/tmp$ man -S 1,1posix ls
xb@dnxb:/tmp$ man -S 1posix,1 ls
xb@dnxb:/tmp$
You can simply pass the exact section too, without -S
:
xb@dnxb:/tmp$ man 5 ls
No manual entry for ls in section 5
See 'man 7 undocumented' for help when manual pages are not available.
xb@dnxb:/tmp$ man 1posix ls
xb@dnxb:/tmp$
The default ordering can be found here (This file path described in man man
), search order from left to right:
xb@dnxb:/tmp$ \grep SECTION /etc/manpath.config
# the default is 1, n, l, 8, 3, 0, 2, 5, 4, 9, 6, 7. Multiple SECTION
SECTION 1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7
xb@dnxb:/tmp$
How can I display sections of a man-page ?
How can I figure out what sections a man page offers ?
Use apropos [-e]
, whatis
, or man -k
:
xb@dnxb:/tmp$ apropos statvfs #OR man -k statvfs
fstatvfs (2) - get filesystem statistics
fstatvfs (3) - get filesystem statistics
fstatvfs (3posix) - get file system information
statvfs (2) - get filesystem statistics
statvfs (3) - get filesystem statistics
statvfs (3posix) - get file system information
statvfs.h (7posix) - VFS File System information structure
sys_statvfs.h (7posix) - VFS File System information structure
xb@dnxb:/tmp$ apropos -e statvfs #OR whatis statvfs
statvfs (2) - get filesystem statistics
statvfs (3) - get filesystem statistics
statvfs (3posix) - get file system information
xb@dnxb:/tmp$
[2.]
How can I display a short version/preview of a man page ?
I always use --help
to see shorten version of manual(Disclaimer: Not exactly equivalent), e.g.:
xb@dnxb:/tmp$ mplayer --help
Usage: mplayer [options] [url|path/]filename
Basic options: (complete list in the man page)
-vo <drv> select video output driver ('-vo help' for a list)
-ao <drv> select audio output driver ('-ao help' for a list)
vcd://<trackno> play (S)VCD (Super Video CD) track (raw device, no mount)
dvd://<titleno> play DVD title from device instead of plain file
-alang/-slang select DVD audio/subtitle language (by 2-char country code)
-ss <position> seek to given (seconds or hh:mm:ss) position
-nosound do not play sound
-fs fullscreen playback (or -vm, -zoom, details in the man page)
-x <x> -y <y> set display resolution (for use with -vm or -zoom)
-sub <file> specify subtitle file to use (also see -subfps, -subdelay)
-playlist <file> specify playlist file
-vid x -aid y select video (x) and audio (y) stream to play
-fps x -srate y change video (x fps) and audio (y Hz) rate
-pp <quality> enable postprocessing filter (details in the man page)
-framedrop enable frame dropping (for slow machines)
Basic keys: (complete list in the man page, also check input.conf)
<- or -> seek backward/forward 10 seconds
down or up seek backward/forward 1 minute
pgdown or pgup seek backward/forward 10 minutes
< or > step backward/forward in playlist
p or SPACE pause movie (press any key to continue)
q or ESC stop playing and quit program
+ or - adjust audio delay by +/- 0.1 second
o cycle OSD mode: none / seekbar / seekbar + timer
* or / increase or decrease PCM volume
x or z adjust subtitle delay by +/- 0.1 second
r or t adjust subtitle position up/down, also see -vf expand
* * * SEE THE MAN PAGE FOR DETAILS, FURTHER (ADVANCED) OPTIONS AND KEYS * * *
MPlayer 1.3.0 (Debian), built with gcc-5.4.0 (C) 2000-2016 MPlayer Team
xb@dnxb:/tmp$
somecommand --help
, but that's not a man page, nor is it available for all commands. – Wildcard Oct 21 '16 at 22:32