Solved

Display all commands?

Posted on 2004-10-19
2
441 Views
Last Modified: 2013-12-06
using HP UX.  is there a way within the OS to display a list of all the commands?  i.e. get a list of all the commands that have a man entry?

thx.
0
Comment
Question by:benpung
2 Comments
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 50 total points
ID: 12350521
A "command" is just an executable file that is in your PATH, so the following would do the trick:

echo $PATH | tr : '
' | while read dir
do  ls $dir | while read file
    do [ -x $dir/$file ] && echo $file
    done
done | sort -u


As for finding all man pages, you're looking at something more like:

echo $MANPATH | tr : '
' | while read dir
do      ls $dir/*
done | sort -u
0
 
LVL 1

Author Comment

by:benpung
ID: 12351752
just what i was looking for. thanks a lot.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sed -- search an replace multiple pattern 11 88
Skill Development 15 183
check unix curl command return value 7 151
How to clone solaris 10 machine 33 148
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question