New answers tagged

0

To look efficiently for single character switch, for example -u, you can often use: /-u($|\s) Saves a lot of time if many options have '-u' as prefix.


0

First off, you have to have the man pages written in the language of your choice, obviously Italian for you. Then you check if the Italian language is in your locale. Run locale -a and see if you see something similar to it_CH.iso88591 or it_CH.utf8. If you do, you are good so far, if not, edit /etc/locale.gen and uncomment the language sets you want. Then, ...


1

You can run it from your terminal: man --locale=it


2

You can use -P flag of man program to use a pager to display pages. For example you can use less as the pager program with flag -p to search for the pattern ERROR happening in the beginning of the line inside the man page: man -P 'less -p ^ERRORS' symlink This opens man page of symlink and jumps directly to the ERRORS section of it.


2

To quote my own post from Meta: Linking to man pages I already have a favored method for this, which you can read about in the less man page in two places: LESS='+/\+cmd' man less and LESS='+/LESS[[:space:]]*Options' man less (See what I did there?)


0

If you just open a manpage like: man cowsay You can then type: /AUTHOR to find and jump to the AUTHOR line, for example. Or: /myFunction to find instances of myFunction in the manpage. (If there are multiple instances, you can press n to go to the next instance) Also, if you're in a man page, you can type h and get a summary of less commands like below. I ...


4

It doesn't duplicate the information: you can have more suffixes in a given directory than the plain ".1" or ".3", e.g., (depending on the platform) letters following the numbers. For example, Debian follows the ".3" with a an application suffix such as "pm" for Perl modules. Here is (part) of the listing from /usr/share/man/man1, to illustrate: ...


2

At this point I'd say the main reason is backwards compatibility — the directory split was there right from the start, in V4 (that's the fourth release of UNIX, not SVR4). Back then there could have been any number of reasons: avoiding having to handle many files in a single directory, thinking of the manual pages as parts of a book...


1

Assuming that you put your man pages next to your executables (i.e. executables in /somewhere/bin, man pages in /somewhere/man/manSECTION), and you're using a man implementation with a manpath command, such as most Linux systems and FreeBSD and OS X, just run manpath. It constructs a MANPATH variable that's parallel to your `PATH. unset MANPATH ...


1

Add the following to your ~/.bashrc or ~/.profile: export MANPATH="$HOME/coreutils-8.25/share/man:$(manpath)" This will put your man page tree in $MANPATH first, before the default MANPATH (as supplied by the manpath command)


1

2. You almost have it.  man -w sort shows you where it gets the man page for sort. 1 & 3. Probably not, since man pages can be anywhere. 3. You can do a brute-force search: find / -name "sort.1*"


1

For local installs such as that, I use a shell-script to setup the PATH, LD_LIBRARY_PATH and MANPATH values so that I get consistent results. Without a prop like that, you will not get automatic consistent results. Here is an old example: #!/bin/bash # $Id: with-ncurses,v 1.1 2006/09/02 23:04:39 tom Exp $ export LIBS="-lncursesw" for prefix in \ ...


1

Some programs and commands implement --help to give a quick usage summary but man pages are usually much more detailed, better formatted and allow navigation through them instead of a plain text output.


0

On Mac OS X, the only thing I can get to work is man -k . | grep -F '(3)', which lists everything in section 3.


2

Answer here: What does !#:3 mean in a shell command Basically, you can use it to shorten a command in combination with ':n', so: $ cd /home/me/some/super/deep/dir/that/i/do/not/want/to/type/again ; ll !#:2 Of course this is a bit silly example, because you could just do ll, but you get the idea, it can be used in sh scripts.



Top 50 recent answers are included