type=page
status=published
title=list-commands
next=list-components.html
prev=list-clusters.html
~~~~~~

= list-commands

[[list-commands-1]][[GSRFM00154]][[list-commands]]

== list-commands

Lists available commands

[[sthref1381]]

=== Synopsis

[source]
----
asadmin [asadmin-options] list-commands [--help]
[--localonly={false|true}] [--remoteonly={false|true}]

pattern-list
----

[[sthref1382]]

=== Description

The `list-commands` subcommand lists the `asadmin` subcommands.

By default, the `list-commands` subcommand displays a list of local
subcommands followed by a list of remote subcommands. You can specify
that only remote subcommands or only local subcommands are listed and
that only subcommands whose names contain a specified text string are
listed.

This subcommand is supported in local mode and remote mode.

[[sthref1383]]

=== Options

asadmin-options::
  Options for the `asadmin` utility. For information about these
  options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
  Displays the help text for the subcommand.
`--localonly`::
  If this option is set to true, only local commands are listed. Default
  is false. +
  If this option is set to true, the `--remoteonly` option must be set
  to false. Otherwise, an error occurs.
`--remoteonly`::
  If this option is set to true, only remote commands are listed.
  Default is false. +
  If this option is set to true, the `--localonly` option must be set to
  false. Otherwise, an error occurs.

[[sthref1384]]

=== Operands

pattern-list::
  A space-separated list of text strings on which to filter the list of
  subcommands. Only the subcommands that contain any one of the
  specified text strings is listed.

[[sthref1385]]

=== Examples

[[GSRFM644]][[sthref1386]]

==== Example 1   Listing the Local Subcommands

This example lists only the local subcommands.

[source]
----
asadmin> list-commands --localonly=true
********** Local Commands **********
change-admin-password
change-master-password
create-domain
create-service
delete-domain
export
help
list-commands
list-domains
login
monitor
multimode
restart-domain
start-database
start-domain
stop-database
stop-domain
unset
verify-domain-xml
version
Command list-commands executed successfully.
----

[[GSRFM645]][[sthref1387]]

==== Example 2   Filtering the Subcommands That Are Listed

This example lists only the subcomands whose names contain the text
`configure` or `set`.

[source]
----
asadmin> list-commands configure set
********** Local Commands **********
setup-ssh
unset

********** Remote Commands **********
configure-jms-cluster                   set-log-levels
configure-lb-weight                     set-web-context-param
configure-ldap-for-admin                set-web-env-entry
set                                     unset-web-context-param
set-log-attributes                      unset-web-env-entry

Command list-commands executed successfully.
----

[[GSRFM646]][[sthref1388]]

==== Example 3   Listing All Subcommands

This example first displays a list of the local subcommands, followed by
a partial list of the remote subcommands.

[source]
----
asadmin> list-commands
********** Local Commands **********
change-admin-password
change-master-password
create-domain
create-service
delete-domain
export
help
list-commands
list-domains
login
monitor
multimode
restart-domain
start-database
start-domain
stop-database
stop-domain
unset
verify-domain-xml
version
********** Remote Commands **********
__locations                             enable
add-resources                           enable-monitoring
configure-ldap-for-admin                flush-jmsdest
create-admin-object                     freeze-transaction-service
create-audit-module                     generate-jvm-report
create-auth-realm                       get
create-connector-connection-pool        get-client-stubs
create-connector-resource               get-host-and-port
create-connector-security-map           jms-ping
create-connector-work-security-map      list
create-custom-resource                  list-admin-objects
create-file-user                        list-app-refs
create-http                             list-applications
create-http-listener                    list-audit-modules
create-iiop-listener                    list-auth-realms
create-javamail-resource                list-components
create-jdbc-connection-pool             list-connector-connection-pools
create-jdbc-resource                    list-connector-resources
create-jms-host                         list-connector-security-maps
create-jms-resource                     list-connector-work-security-maps
create-jmsdest                          list-containers
create-jndi-resource                    list-custom-resources
create-jvm-options                      list-file-groups
create-lifecycle-module                 list-file-users
create-message-security-provider        list-http-listeners
create-network-listener                 list-iiop-listeners
create-password-alias                   list-javamail-resources
create-profiler                         list-jdbc-connection-pools
create-protocol                         list-jdbc-resources
create-resource-adapter-config          list-jms-hosts
create-resource-ref                     list-jms-resources
create-ssl                              list-jmsdest
create-system-properties                list-jndi-entries
create-threadpool                       list-jndi-resources
create-transport                        list-jvm-options
create-virtual-server                   list-lifecycle-modules
delete-admin-object                     list-logger-levels
delete-audit-module                     list-message-security-providers
...
----

[[sthref1389]]

=== Exit Status

0::
  subcommand executed successfully
1::
  error in executing the subcommand

[[sthref1390]]

=== See Also

link:asadmin.html#asadmin-1m[`asadmin`(1M)]

link:list-components.html#list-components-1[`list-components`(1)],
link:list-containers.html#list-containers-1[`list-containers`(1)],
link:list-modules.html#list-modules-1[`list-modules`(1)]


