Hot answers tagged

2174

Dear @colmmacuait, I think that if you type "man" at 0001 hours it should print "gimme gimme gimme". #abba @marnanel - 3 November 2011 er, that was my fault, I suggested it. Sorry. Pretty much the whole story is in the commit. The maintainer of man is a good friend of mine, and one day six years ago I jokingly said to him that if you invoke man after ...


431

This is an easter egg in man. When you run man without specifying the page or with -w, it outputs "gimme gimme gimme" to stderr, but only at 00:30: # date +%T -s "00:30:00" 00:30:00 # man -w gimme gimme gimme /usr/local/share/man:/usr/share/man:/usr/man The exit code is always 0. The correct output should always be: # man -w /usr/local/share/man:/usr/...


396

This feature is called Software Flow Control (XON/XOFF flow control) When one end of the data link (in this case the terminal emulator) can't receive any more data (because the buffer is full or nearing full or the user sends C-s) it will send an "XOFF" to tell the sending end of the data link to pause until the "XON" signal is received. What is ...


369

After some reflection, I've removed this Easter egg. It'll be gone in the upcoming man-db 2.8.0. I'm glad that it made some people smile, which after all was the whole purpose of it, and my Twitter notifications and so on today suggest that most people thought it was more amusing than annoying. Still, some people did find it annoying, and six years seems ...


72

Some implementations of man, including the one used by Ubuntu, replace spaces in its search terms with hyphens and attempt to find a manual page under that name. So man git init looks for the same thing as man git-init. Similarly, man run parts and man ntfs 3g work (if you have run-parts and ntfs-3g on your system). It only does this with word pairs, though,...


66

GNU Info was designed to offer documentation that was comprehensive, hyperlinked, and possible to output to multiple formats. Man pages were available, and they were great at providing printed output. However, they were designed such that each man page had a reasonably small set of content. A man page might have the discussion on a single C function such ...


62

ps and top display CPU time used, not clock time since the process started. One way to check when the process started is use the following command. The PID file creation date is when the process started: ls -ld /proc/pid So for process 2303 it would be: ls -ld /proc/2303


56

minutes:seconds.hundredths Searching for “TIME+” or for “seconds” gives the answer, kind of (I wouldn't call the man page clear). This format is inherited from BSD, you also get it with ps u or ps l under Linux.


51

kill [ -s signal | -p ] This syntax in a manual page means: You can use kill -s signal or you can use kill -p, but you can't use both -s and -p at the same time. The pipe (|) stands for (exclusive) or in the documentation, it's not part of the command. When you type foo | bar in your shell, it will attempt to start foo and bar, and pipe the output of ...


50

Termcap is a library that Less uses to access the terminal. Termcap is largely obsolete, having been replaced by Terminfo, but Terminfo offers a Termcap compatibility interface to applications. Less is content with the Termcap interface and uses that. The Termcap library is a description of the terminal's facilities. Each facility is identified by a two-...


50

That depends on the man pages... Traditionally, they have included a section with examples - but for some reason that is usually missing from the man pages under Linux (and I assume other using GNU commands - which are most these days). On for example Solaris on the other hand, almost every man page include the Example section, often with several examples. ...


46

The standard synopsis for the rm utility is specified in the POSIX standard1&2 as rm [-iRr] file... rm -f [-iRr] [file...] In its first form, it does require at least one file operand, but in its second form it does not. Doing rm -f with no file operands is not an error: $ rm -f $ echo "$?" 0 ... but it just doesn't do very much. The standard says ...


45

You're thinking of the boot(7) manual (man 7 boot) and/or the bootup(7) manual (man 7 bootup). Those are the manuals I can think of on (Ubuntu) Linux that best fits your description. These manuals are available on the web (see links above), but the definite text is what's available on the system that you are using. If a web-based manual says one thing but ...


43

Overstriking is a method used in nroff (see the Troff paper) to offer more typographical possibilities than plain ASCII would allow: bold text (by overstriking the same character) underlined text (by overstriking _) accents and diacritics (e.g. é produced by overstriking e with ’) and various other symbols, as permitted by the target output device. In ...


42

The reason the Info system was invented is necessity, but I guess "laziness, hubris and impatience" is an equally good explanation. The point of the GNU project was to develop a freely modifiable and freely distributible operating system and tools. The traditional Unix man system was based on the nroff/troff document formatting system from Bell Labs, which ...


40

The manual is out of date with the program. Try ls --help | grep -- ' -1': -1 list one file per line It is one of the last options described if you just do ls --help.


40

In contrast to a printed (hard-copy) manual, which you could read off-line (while not using a computer). The term dates back (at least) to time-sharing systems. Users may have had a terminal which could be used for typing text, punching paper tapes. But they were only able to use the computer when they were on-line (the "line" referring to the ...


39

Check the existence of MANOPT variable. MANOPT If $MANOPT is set, it will be parsed prior to man's command line and is expected to be in a similar format. source Example: $ MANOPT='foo bar' $ export MANOPT $ man man man: Too many arguments Try 'man --help' or 'man --usage' for more information. $ An obvious ad-hoc fix is to unset MANOPT. Then you ...


38

help is a built-in command in the bash shell (and that shell only) that documents some of the builtin commands and keywords of that shell. That's an internal documentation system of that shell. Other shells have their own documentation system (ksh93 has --help and --man options for its builtins, zsh has a run-help helper that extracts information from ...


38

This is quite nicely explained in man man: The following conventions apply to the SYNOPSIS section and can be used as a guide in other sections. bold text type exactly as shown. italic text replace with appropriate argument. [-abc] any or all arguments within [ ] are optional. -a|-b options ...


36

The semantics and the usual glyphs for these characters have changed (several times) during the last 50 years. The six-bit predecessors of ASCII contained various multi-purpose characters, including one single quote-like character, which was used for anything that had some similarity with a quote: opening quote, closing quote, apostrophe, or (by ...


35

konqueror also describes non-standard sections: (thanks to @greg0ire for the idea) 0 Header files 0p Header files (POSIX) 1 Executable programs or shell commands 1p Executable programs or shell commands (POSIX) 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 3n Network Functions ...


33

For quickly getting help on a Bash builtin, use help: help read is what you want. For man-page-like formatting, use help -m read or, even better, help -m read | less If you still insist on looking for it in the man page, I find what quickly gets me to a command's explanation is /^\s*read [[] This works because when a command is first explained, its ...


33

If you add a | sed -n l to that tail command, to show non-printable characters, you'll probably see something like: N\bNA\bAM\bME\bE That is, each character is written as X Backspace X. On modern terminals, the character ends up being written over itself (as Backspace aka BS aka \b aka ^H is the character that moves the cursor one column to the left) with ...


32

I think you're getting tripped on the fact that there is a builtin command to Bash called kill, along with the command kill. $ type -a kill kill is a shell builtin kill is /usr/bin/kill kill is /bin/kill The man page you're reading is referring to the kill command located under /bin. Use the full path to summon it: $ /bin/kill -p sleep 16486 Incidentally ...


32

From man man: -K, --global-apropos Search for text in all manual pages. This is a brute-force search, and is likely to take some time; if you can, you should specify a section to reduce the number of pages that need to be searched. Search terms may be simple strings (the default), or regular expressions if the --regex ...


28

To list all installed man pages from a specific section you can use apropos: apropos -s 2 . # use an regex for apropos . means anything apropos -s 2 -w '*' # use unix globbing for apropos


28

At the end of my .bashrc script I have added: #so as not to be disturbed by Ctrl-S ctrl-Q in terminals: stty -ixon Edit: over time I have removed this line from my config, as I eventually find it handy to freeze the terminal output with Ctrl-S and resume it with Ctrl-Q. It is not useful everyday, but it's nice to have.


Only top voted, non community-wiki answers of a minimum length are eligible