Tag Info

New answers tagged

2

Since you're on Ubuntu, the pager used to visualise man pages is probably GNU less. As you can see after pressing h: ESC-u Undo (toggle) search highlighting. In most terminals, it should be equivalent to Alt+U.


0

In this situation, is useful to see the entire list of all available pages with this manpage name: $ man -k ^open$ open (1) - start a program on a new virtual terminal (VT). open (2) - open and possibly create a file or device Or view the content of all existing manpages and thus identify required: $ man -a open


2

When I am unsure in what section a certain manpage is, I use the -a option. -a, --all By default, man will exit after displaying the most suitable manual page it finds. Using this option forces man to display all the manual pages with names that match the search criteria. From the example in the manpage for man: ...


9

Just to clarify the reason for this further, the manpage is in section 2 because it is a system call (implemented more or less directly as part of the kernel, rather than the C library). This distinction can seem somewhat arbitrary, especially with older system calls that are now library functions (fork is still in section 2 even though it is now a wrapper ...


16

You want man 2 open for the C library interface, not man 3 open. It is indeed in manpages-dev (not manpage-dev). man 3 open gives a Perl manual page. # Show the corresponding source groff file man -w 2 open /usr/share/man/man2/open.2.gz # Show which package this file belongs to dpkg -S /usr/share/man/man2/open.2.gz manpages-dev: ...


13

The manpage sections are described in the manpages themselves. Enter man man in a shell session to see the various sections and general content: 1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 ...


4

I was having the opposite problem on a Debian 8 image which somebody had put together for a Wandboard. I was trying to find the manual page for some packages which were already installed and noticed that after installing some new ones, the manual pages were missing, even though they were present in the deb file. I then found this file 01_nodoc in ...


8

Man pages are written in the troff/nroff markup language. Troff, which is meant for preparing output to a phototypesetter (or to files in formats such as PostScript or PDF), will automatically change the ` and ' characters in the input into curved quotation marks, ‘ and ’. Nroff, which is what the man command runs when the output is to a terminal, will pass ...


5

These quotation marks are often used because they look nice, similar to the quotation marks in printed books (which are different at the beginning and end of the quoted passage). These quotation marks may also have been added by your local troff configuration (or, could be removed by it!). The actual file may not contain these characters literally. You ...


3

The 3pm section is not used anymore. It is defined as manual pages concerning modul packages of perl in an old version of the Debian Perl Policy, noteably in version 1.2. Here is a site where you can read that old deprecated policy (see §3.1 and §1.4). In the latest Debian Perl Policy it is defined in §2.4 that module manual pages should be installed in ...


4

You can just use grep as a pager: man -P 'grep NR' awk but it is way better to just search for pattern with / in less (that is probably your default pager), so: man awk and then /^ *NR This way you will find only headers (patterns at the beginning of the lines).


3

With the command you tried, echo is printing every word in the manual page on a single line. You would have had a better luck with: echo "`man awk`" | grep NR or better echo "$(man awk)" | grep NR or even better, given the fact echo is useless here: man awk | grep NR Note that most if not all man implementations detect their output is a pipe and ...


0

My reputation doesn't permit commenting, or I'd just append this to the recommendation to use dpkg-reconfigure locales, which failed for me (my hunch is that if it were working, I wouldn't have this problem. The problem me@pc:~$ man man: can't set the locale; make sure $LC_* and $LANG are correct What manual page do you want? First try to solve it, fails ...


0

The man page says search above. This you can do by typing ? (to search backward, followed by Pathname Expansion and hitting N to search further in the previous direction, until you find the definition.


4

Even the Bash 2.0 man page contains a section on Brace Expansion. From the archives of FreeBSD, the manpage of bash (1) for CentOS 3.9: Brace Expansion Brace expansion is a mechanism by which arbitrary strings may be gener- ated. This mechanism is similar to pathname expansion, but the file- names generated need not exist. Patterns to be brace ...


1

Test what kind of command the argument is. This has the added benefit of correctly detecting aliases and functions that might shadow external commands. rtfm () { declare x for x; do case $x in alias) alias "$x";; keyword) LESS="$LESS+/^SHELL GRAMMAR" man bash;; function) type "$x";; builtin) help "$x";; file) ...



Top 50 recent answers are included