Solved

Display all commands?

Posted on 2004-10-19
2
442 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 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
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…

733 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