Display all commands?

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.
LVL 1
benpungAsked:
Who is Participating?
 
chris_calabreseConnect With a Mentor Commented:
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
 
benpungAuthor Commented:
just what i was looking for. thanks a lot.
0
All Courses

From novice to tech pro — start learning today.