redirection: List of all commands into file.

Great tip: List Of Linux Commands - openSUSE Forums

from referenced post:

open a console and press <tab> two times. And they press <y> to show all 4000+ possibilities

My question has to do with redirection. How can I get the entire list of commands into a ‘>’ file? I’m stuck at the press <tab> two times step.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use X. Go ahead and do what they show, press the spacebar to get all of
them printed to the screen. Do this in gnome-terminal or konsole or
something fancier like that (than xterm). Once done use your mouse to
select everything and drop it into a text file (gedit, kate, etc.).

I’ve wondered the same thing but never found a way to do it except what
was covered above.

Good luck.

On 06/08/2010 01:26 PM, danperecky wrote:
>
> Great tip: ‘List Of Linux Commands - openSUSE Forums’
> (http://tinyurl.com/28emhjz)
>
> from referenced post: > open a console and press <tab> two times. And they press <y> to show all
>> 4000+ possibilities
>
> My question has to do with redirection. How can I get the entire list
> of commands into a ‘>’ file? I’m stuck at the -press <tab> two times-
> step.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMDpp4AAoJEF+XTK08PnB57AcQALgjTOusR5ngu58sjVog44fy
U7s7Zm/xw7QmY821QGiG91mvrd5zlUZOm0urTRNRuHYCiXqda+ye83KLK5IeeWb2
h2GT8ePCMbPIv+O9UzISDWQJJVfebrffSz45V5UmXnZ0dabIb1sEpZRbSAfdm3fn
xY5ERB689MoZl5763/HLNaYMYS7TezHCPbXDMpSDN+Gt2WR7k284ftUyTkFH3HOD
wDwwW/bfLo2uY3Hh4I96D9T3NhoGM4tBFYIBu1tPmadrIGW8tom69crU/iXe7ZJj
irsDZVtvMG0fe/jdRwAd4807M31cDAHufSDZqoWmkhFhrOJVUCnWlSVqEFr9ynHw
V4A5CmniXXSAlqFD+Wgi7WFavO6R+EDJfpZBQDg7LL6Qxdtrg4WhEF98n6b+jFzt
x+Ar8vmFTRuKiRyo1seSqeGkT3xKhz6d8yV3ToYos7a62cRGt1X+T+PftxAACZ2F
cjXC9ssraykE22sjSJ3y7KzhG0QK3fELsXKspRzGah50R4PlX2v6ipLnS0Ox5XgM
fISdZIm0zfoO8GeM1op/TiKNrJPGrUjq9bAdtDhnDD++zwqNr9YQehq6J5G4xIir
5pvbjQWA+9atQy1CrxRN5lCB1Sn9o3Kz9fURdh/o1Ti74Mf2rxOEMpTCBa/472yk
SQHyeU6F5r3eVpxqcNJH
=p6Zr
-----END PGP SIGNATURE-----

Hi


malcolml@oscar-sled:~$ ls /usr/bin |wc -l
2417
malcolml@oscar-sled:~$ ls /usr/sbin/ |wc -l
459
malcolml@oscar-sled:~$ ls /bin/ |wc -l
120
malcolml@oscar-sled:~$ ls /sbin/ |wc -l
300
malcolml@oscar-sled:~$ ls /usr/bin /usr/sbin /bin /sbin > commands.txt
malcolml@oscar-sled:~$ cat commands.txt |wc -l
3303
malcolml@oscar-sled:~$ less commands.txt

That should keep you busy for awhile :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.12-0.7-default
up 23:01, 2 users, load average: 0.43, 0.15, 0.12
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 195.36.15

both of your pointers to the information - rival the value of the information itself. :good:


su -c 'find / -type f -executable -print > filename_of_your_choice

This prints out all the files that are executable into the filename…Do ‘man find’ to set output options to omit the path.

Hi
Dang over 25K, but a lot are libraries, system scripts etc. From a pure
user perspective it may be better to use echo $PATH and then look in
each of those directories.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.12-0.7-default
up 1 day 0:42, 2 users, load average: 0.02, 0.09, 0.13
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 195.36.15

$ ls echo $PATH | sed 's/:/ /g' -1 > cmd
$ whatis cat cmd > cmd_desc

3-4000 possibilities is pretty useless unless you know what they are for, but just FYI you can capture what you are seeing in a session using the script command.

$ script
Script started, file is typescript
$ <tab><tab>
(after paging through many screens)

$ exit
Script done, file is typescript

typescript contains a log of your session. Unfortunately it also contains carriage returns and is formatted exactly as you saw on the screen, in multiple columns and also you have the prompts for more, with control characters.

But more generally script is a useful way to get a transcript of a session.