find `echo "${PATH}" | tr ':' ' '` -type f | while read COMMAND; do man -f "${COMMAND##*/}"; done

List commands with a short summary

Obviously, you can replace 'man' command with any command in this command line to do useful things. I just want to mention that there is a way to list all the commands which you can execute directly without giving fullpath. Normally all important commands will be placed in your PATH directories. This commandline uses that variable to get commands. Works in Ubuntu, will work in all 'manpage' configured *nix systems.
Sample Output
$ find `echo "${PATH}" | tr ':' ' '` -type f -a -name '*ctl*' | while read COMMAND; do man -f "${COMMAND##*/}"; done
cupsctl (8)          - configure cupsd.conf options
pactl (1)            - Control a running PulseAudio sound server
esdctl (1)           - The Enlightened Sound Daemon
sysctl (8)           - configure kernel parameters at runtime
alsactl (1)          - advanced controls for ALSA soundcard driver
pccardctl (8)        - PCMCIA card control utility
initctl (8)          - init daemon control utility

3
By: mohan43u
2009-06-13 19:56:24

These Might Interest You

  • This will list all the gpg keys that were accepted and installed for yum. Show Sample Output


    0
    rpm -qa gpg-pubkey --qf "%{version}-%{release} %{summary}\n"
    krizzo · 2014-12-09 21:23:28 0

  • 0
    cat z.log | cut -d ':' -f1 | sort | uniq | xargs -l1 -iFF echo 'echo FF $(cat z.log | grep -e "^FF" | grep -e Timeout | wc -l )' | bash
    hute37 · 2012-02-28 17:25:14 0
  • host is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments or options are given, host prints a short summary of its command line arguments and options. Show Sample Output


    1
    host google.com
    tommaso · 2009-03-24 16:25:12 4

  • 7
    compgen -c | sort -u > commands && less commands
    Habitual · 2012-04-27 14:19:05 1
  • Tuned for short command line - you can set the path to sessionstore.js more reliable instead of use asterixes etc. Usable when you are not at home and really need to get your actual opened tabs on your home computer (via SSH). I am using it from my work if I forgot to bookmark some new interesting webpage, which I have visited at home. Also other way to list tabs when your firefox has crashed (restoring of tabs doesn't work always). This script includes also tabs which has been closed short time before.


    2
    F="$HOME/.moz*/fire*/*/session*.js" ; grep -Go 'entries:\[[^]]*' $F | cut -d[ -f2 | while read A ; do echo $A | sed s/url:/\n/g | tail -1 | cut -d\" -f2; done
    b2e · 2009-05-21 21:58:42 0
  • Change the $domain variable to whichever domain you wish to query. Works with the majority of whois info; for some that won't, you may have to compromise: domain=google.com; for a in $(whois $domain | grep "Domain servers in listed order:" --after 3 | grep -v "Domain servers in listed order:"); do echo ">>> Nameservers for $domain from $a Note that this doesn't work as well as the first one; if they have more than 3 nameservers, it won't hit them all. As the summary states, this can be useful for making sure the whois nameservers for a domain match the nameserver records (NS records) from the nameservers themselves. Show Sample Output


    2
    domain=google.com; for ns in $(whois $domain | awk -F: '/Name Server/{print $2}'); do echo ">>> Nameservers for $domain from $a <<<"; dig @$ns $domain ns +short; echo; done;
    laebshade · 2011-05-08 04:46:34 0

What Others Think

that's nice, there is also this command that does something similar: whatis <some-command> eg. # whatis man man (1) - format and display the on-line manual pages man (1p) - display system documentation man (7) - macros to format man pages man-pages (7) - conventions for writing Linux man pages man.conf [man] (5) - configuration data for man
JesusSuperstar · 466 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

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.

Share Your Commands



Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: