?
Solved

Display all commands?

Posted on 2004-10-19
2
Medium Priority
?
444 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 200 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

770 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