Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Display all commands?

Posted on 2004-10-19
2
Medium Priority
?
445 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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

618 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