7 Replies Latest reply: Aug 3, 2009 4:42 AM by Jun T.
Tohu Level 1 Level 1 (90 points)
Hi.

Is there any list with all commands that can be used in terminal, maybe with a short description?

I found this following list but it is'nt complete.
http://en.wikipedia.org/wiki/Listof_Unixprograms

Mac OS X (10.5.7), Allways got the latest updates installed.
  • red_menace Level 6 Level 6 (14,820 points)
    Apple's manual pages are just too big to navigate. I found http://ss64.com/osx/ a while back (it has descriptions and other links), and an application I frequently use is Bwana - it can put an index of all the man pages on your machine onto a browser page.
  • Jun T. Level 4 Level 4 (2,185 points)
    whatis database files:

    /usr/share/man/whatis
    /usr/X11/man/whatis
    usr/local/share/man/whatis

    If you want only user commands (section 1 of the Manuals) then

    grep '(1)' /usr/share/man/whatis

    I guess you know section 8 contains admin commands.
  • Bang A. Lore Level 2 Level 2 (180 points)
    There is no such list as it would be unreadable.
  • LittleSaint Level 4 Level 4 (2,900 points)
    For a list of everything, hit the tab key twice. For a list with descriptions, try Google. I'm sure someone has compiled one.
  • BobHarris Level 6 Level 6 (15,385 points)
    All executable programs are potential commands in Unix. And then there are the built-in shell commands such as cd if while etc...

    By default bash is the shell used, so for information on bash try

    man bash

    and then check out books on bash in the book store, or search on-line for information about bash

    Typically other user commands come from

    ls /bin
    ls /usr/bin

    Administrator commands tend to come from

    ls /sbin
    ls /usr/sbin

    User install commands tend to be stored in

    ls /usr/local/bin
    ls /usr/local/sbin

    X11 commands are stored in

    ls /usr/X11/bin

    Many Unix users put scripts and program they have written for personal use in

    ls $HOME/bin

    MacPorts.org <http://www.macports.org/> puts commands in

    ls /opt/local/bin
    ls /opt/local/sbin

    Fink <http://www.finkproject.org/> puts commands in

    ls /sw/bin
    ls /sw/sbin

    Additional commands and scripts maybe stored in other locations.

    Except for personal programs and scripts, most commands will have a *man page* so once you find a command that looks interesting, you can issue the

    man filename

    and there is a good chance a *man page* will display.

    And if all else fails, there is Google.
  • Tohu Level 1 Level 1 (90 points)
    Hi.

    Thanks everybody for all the great information.

    For me Jun T. advice works best because it shows not only the commands but a short description too.


    grep '(1)' /usr/share/man/whatis

    If there is a way to display all 8 sections at once i would love to hear. But if not then never mind.
  • Jun T. Level 4 Level 4 (2,185 points)
    If there is a way to display all 8 sections at once


    What do you mean by "all 8 sections at once'?
    grep is used for selecting only section 1, so you can just view the entire file by your favorite editors (e.g., TextEdit.app) or pagers, for example

    less /usr/share/man/whatis

    but the files contain not only commands but also system calls (section 2), library functions (section 3), etc.
    See 'man manpages' for more detail.

    If you mean 'listing sections 1 and 8' then

    grep '([18])' /usr/share/man/whatis

    If you mean 'combining contents of three databse files' then

    cat /usr/{share,X11,local/share}/man/whatis | grep '(1)'

    and you can save the output of grep to a file by redirection

    cat /usr/{share,X11,local/share}/man/whatis | grep '(1)' > list.txt