You can view the man pages from section five by passing the section number as an argument to the man command Show Sample Output
Often you find some tty programs are messed up and confused about character encoding - 'man' is a common problem and sometimes displays weird characters for apostrophes, hyphens etc etc. Another class of programs that suffer from this are those that try to use the line drawing characters - eg RedHat's tty system admin functions such as system-config-firewall-tui system-config-network-tui etc. Adding 'LC_ALL=C' fixes most of these problems (as long as you want English! Perhaps speakers of other languages can add a comment here). For bonus points, I've added the '-c' option to the man command so that it ignores it's cache and re-computes the man page using the C locale.
There once was a day I needed this info. Show Sample Output
I'm not sure why you would want to do this, but this seems a lot simpler (easier to understand) than the version someone submitted using awk.
Simple edit to work for OSX. Now just add this to your ~/.profile and `source ~/.profile`
Find the usage of a switch with out searching through the entire man page.
Usage: manswitch [cmd] [switch]
Eg:
manswitch grep silent
____________________________
In simple words
man <cmd> | grep "\-<switch>"
Eg:
man grep | grep "\-o"
This is not a standard method but works.
Show Sample Output
This will open the manpage for "foobar", and display all instances of "searched_string". You can traverse through them by pressing "n"
Same as the other rtfm's, but using the more correct xdg-open instead of $BROWSER. I can't find a way to open info only if the term exists, so it stays out of my version.
Using perl, here, we grep the man page of fetchmail to find the paragraph starting with '-k | --keep' and ending before the paragraph starting with '-K | --nokeep' Show Sample Output
Creates a PDF (over ps as intermediate format) out of any given manpage. Other useful arguments for the -T switch are dvi, utf8 or latin1.
Output manpage as plaintext using cat as pager: man -P cat commandname And redirect its stdout into a file: man -P cat commandname > textfile.txt Example: man -P cat ls > man_ls.txt
Prepends paths containing man directories to your MANPATH variable for the given top level directory. If you build or install software with non-standard documentation locations, you can just add them to your MANPATH with this little function. -xdev prevents crossing filesystem boundaries when searching for man dirs. Show Sample Output
Quicker way to search man pages of command for key word Show Sample Output
ulimit [-SHacdflmnpstuv [limit]] Provides control over the resources available to the shell and to processes started by it, on systems that allow such control. The -H and -S options specify that the hard or soft limit is set for the given resource. A hard limit cannot be increased once it is set; a soft limit may be increased up to the value of the hard limit. If neither -H nor -S is specified, both the soft and hard limits are set. # jumps straight to the definition of ulimit in the bash man page. Show Sample Output
Yeah yeah, another "render man page in pdf", but this time it creates a temporary PDF that stays resident in memory for viewing, but is eliminated on the filesystem. Replace evince with your PDF viewer of choice.
Typographically speaking, it's generally the [accepted wisdom][1] that about 60 characters per line makes for optimal reading (would that more Web pages followed this convention!). I know I got tired of reading manpages with text as wide as my screen! However, the command above sets manwidth to 70 rather than 60 because paragraphs in manpages are generally indented. I recommend the following snippet for your .${SHELL}rc, which sets manwidth to 70 unless your terminal is smaller than 70 characters: function man () { if [[ $COLUMNS -gt 70 ]]; then MANWIDTH=70 command man $* else command man $* fi } [1]: https://en.wikipedia.org/wiki/Column_(typography)
It shows the complete ascii table, and it works in BSD too, not only in Linux.
print pdf man ls Show Sample Output
Specify the Browser where you want to open the manpage. Show Sample Output
This command requires groff. Install it before executing the command.
I'm on my ubuntu so, I install it like this:
sudo apt-get install groff
You can type in your own command instead of cat. The command will be executed with the path to the html page when it's converted. For instance, this will print out the path to the html file:
man -Hecho ls
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: