Hot answers tagged

2145

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


422

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


364

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


360

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


70

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


62

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


57

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


53

help read help read | less In zsh: run-help read or type read something and press M-h (i.e. Alt+h or ESC h). If you want to have a single man command so as not to need to know whether the command is a built-in, define this function in your ~/.bashrc: man () { case "$(type -t "$1"):$1" in builtin:*) help "$1" | "${PAGER:-less}";; # built-in ...


51

Man pages date back to Unix First Edition. While hypertext had been invented, it was still in infancy; the web was two decades away, and the manual was an actual printed book, often with one command per page if they fit (that's why they were called pages). The format used for manual pages has evolved somewhat since then, but most pages aren't really ...


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


49

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 Solaris on the other hand, almost every man page include the Example section, often with several examples. If I were ...


47

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.


44

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


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

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


41

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


39

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

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

First of all, it's not a link. It's just an underline. Man pages are just text documents with a little bit of simple formatting that a terminal can handle. The underline is just a highlight, there is no "link" involved. The normal man command is just a text formatter. In fact the man command doesn't even display the text, man just formats the information ...


33

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


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

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.


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


31

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


31

Actually it uses whatever is specified in the MANPAGER or the PAGER environment variable. Depending on your man implementation and version there could be also a command line switch to specify the pager. With the man-db implementation I use all the below ways work: MANPAGER=cat man man PAGER=cat man man MANOPT='-P cat' man man man -P cat man To set it ...


29

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

Try this: bashman () { man bash | less -p "^ $1 "; } You may have to hit n a couple of times to get to the actual command instead of a paragraph that happens to have the command name as the first word. Explanation: this pipes the entire output of man bash, i.e. bash's entire man page (which is a huge document, and has subsections explaining each ...


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