Solved

Display all commands?

Posted on 2004-10-19
2
437 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
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.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now