Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.3: See all possible BSD commands in the Terminal UNIX
If you hold the ESC key for more than 3 seconds in terminal, you will be prompted with Display all 870 possibilities? (if you're using Panther Client) or Display all 963 possibilities? (if you're on Server). Type y, and you will see a list of all BSD commands.

[robg adds: This only worked for me in the bash shell, and I've installed a few extras, so I see 1,023 possibilities on my client install.]
    •    
  • Currently 1.67 / 5
  You rated: 2 / 5 (6 votes cast)
 
[23,368 views]  

10.3: See all possible BSD commands in the Terminal | 17 comments | Create New Account
Click here to return to the '10.3: See all possible BSD commands in the Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: See all possible BSD commands in the Terminal
Authored by: feelgood on Nov 12, '03 11:36:41AM

You can get the same thing using tab completion (in bash at least). During typing, you can hit tab, and it will autocomplete what you are typing based on context. If there are mulltiple completions possible, it will just beep at you. You can then hit tab twice and it will show you the possible options. Hitting tab twice on a blank line will show you all available because it is trying to auto-complete what you haven't typed yet.

Fo those that didn't know about tab-completion, it is particularly helpful for navigating through dirs. Type /path/to/some/dir/ and then hit tab twice and you will get all of the files and dirs in that dir.



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: Anonymous on Nov 12, '03 12:02:53PM

not just a panter hint. works in jaguar as well.

---
\"It is better to deserve honors and not have them than to have them and not deserve them.\"
-Mark Twain



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: greggo on Nov 12, '03 02:12:52PM

In tcsh, you can type command x, then command d to display all of the commands. Jaguar 10.2.8 and earlier.



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: aranor on Nov 12, '03 09:07:52PM

I think you mean control-x and control-d



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: cowboy on Nov 12, '03 11:25:27PM

Doesn't work for me in tcsh (using control). Am I missing something?

Man (tab) used to work to list all commands in tcsh. It quit working sometime back.



[ Reply to This | # ]
It's a competition!
Authored by: hayne on Nov 12, '03 01:40:37PM

I get 1612 possibilities!
I hadn't realized that I had installed so many extra command-line programs.



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: flyingtrout on Nov 12, '03 02:49:41PM

1905....but I don't use them all :)



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: higginsta on Nov 12, '03 06:13:48PM

This just seems to be equivalent to the "Tab" key auto completion feature in the bash shell. You can even filter the list by typing a few letters of the command you are interested in.

I have to admit though, I was always curious as to how I could find out all of the commands available to me on a system. (983 in my a stock Panther client)

For those of you that have more than the stock number of commands, what are your favorite or most useful add ons?



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: wgscott on Nov 12, '03 06:26:57PM

In zsh, you can type backslash followed by the tab command and it will list all possibilities of executables in your path and shell commands.

\[tab-key]

zsh: do you wish to see all 3319 possibilities (837 lines)?

My personal favorite is called wtf

You put in an acronym, and it decodes it:

zsh-% wtf lmao
LMAO: laughing my ass off



[ Reply to This | # ]
Installing WTF
Authored by: Paul Burney on Nov 12, '03 08:55:13PM
That's great. If you don't have it on your system, you can get it from fink: sudo fink install wtf

[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: rspress on Nov 13, '03 01:04:12AM

Did not get the Show All Commands by pressing TAB or ESC twice in the Panther default shell.

Did fink and compile WTF however.....most cool!



[ Reply to This | # ]
Just hit 'tab' twice
Authored by: wkoffel on Nov 12, '03 07:20:59PM

In my bash shell (ever since 10.1, I think), just hitting tab twice prompts to show me all programs.

This is standard Unix shell completion. What's going on is that hitting tab tries to complete whatever you've been typing. If there isn't a single matching completion, hitting it again will show the list of possible completions. If that list is over a certain length , it prompts you before spitting them all to the terminal.

So, as a few practical examples, if you want to find a decent subset of all the X11 applications you could run (they often start with the letter 'x', just by convention), type x[tab][tab]

This also works with completion not of applications, but of items in your directories. So let's say you were curious about how many of those X11 applications live in /usr/bin/, you could type

$ cd /usr/bin/
$ ls x[tab][tab]

for me, it yields:
$ ls x
xargs xml2-config xmllint xsubpp
xcodebuild xmlcatalog xstr xxd
$ ls x

tab completion in the shell becomes like breathing eventually. Less than half the commands I use do I ever type all the way out myself, and even fewer of the documents that I edit.



[ Reply to This | # ]
Just hit 'tab' twice
Authored by: wkoffel on Nov 12, '03 07:22:23PM

Oh, and if it's a competition, I'm at 2101 possible commands. I'm sure someone can beat that, though. :-)



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: altos on Nov 12, '03 11:28:09PM

If you want a list with descriptions that you can save to a file try this:

apropos .*



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: jms1 on Nov 13, '03 01:04:36AM

For those (like myself) who prefer tcsh, the same thing can be done using CONTROL-D. For example, typing "m" followed by ^D will show you all commands starting with m... or "mk^D" shows all commands starting with "mk".

There is no simple way to make it show ALL commands- pressing ^D on an empty command line will either log you out, or if you have "set ignoreeof" in your .tcshrc file it prints 'Use "logout" to logout.' This is because in *nix the ^D character means "end of file", and some shells treat an interactively-typed ^D the same way they would an end-of-file when executing a script... they stop running.



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: andrew_zinn on Nov 13, '03 11:07:07AM

Have you tried ctl-X ctl-D ?



[ Reply to This | # ]
10.3: See all possible BSD commands in the Terminal
Authored by: thype on Nov 13, '03 09:34:02AM

This is not completely true, and is not a panther feature. All *NIX OS's with the bash shell, or variants of, have this capability. Also, you are only seeing commands that are in your path. If your path is anything but default, new software added, complied, etc, you see what that shell has a path to execute.



[ Reply to This | # ]