'\" t
.\"     Title: LS
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 04/13/2022
.\"    Manual: BRL-CAD User Commands
.\"    Source: BRL-CAD
.\"  Language: English
.\"
.TH "LS" "nged" "04/13/2022" "BRL\-CAD" "BRL\-CAD User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ls \- The command with no \fIobject\fR argument lists the name of every object in the database (in alphabetical order) except for those marked as hidden with the \fBhide\fR command\&. If the object argument is supplied, only those objects are listed\&.
.SH "SYNOPSIS"
.HP \w'\fBls\fR\ 'u
\fBls\fR [\-A\ \-o\ \-a\ \-c\ \-r\ \-s\ \-p\ \-l\ \-q\ \-H\ \-S] [\fIobjects\fR]
.SH "DESCRIPTION"
.PP
The command with no
\fIobject\fR
argument lists the name of every object in the database (in alphabetical order) except for those marked as hidden with the
\fBhide\fR
command\&. If the
\fIobject\fR
argument is supplied, only those
\fIobjects\fR
are listed\&. The
\fIobject\fR
argument may include regular expressions\&. If the
\fI\-A \fR
option is used, then the arguments are expected to be a list of attribute name/value pairs, and objects having attributes that match the provided list are listed\&. By default, an object must match all the specified attributes in order to be listed; however, the
\fI\-o\fR
flag indicates that an object matching at least one attribute name/value pair should be listed\&. See the
\fBattr\fR
command for information on how to set or get attributes\&. Regular expressions are not supported for attributes\&. The following options are also allowed:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
a \-\- List all objects in the database\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
c \-\- List all non\-hidden combinations in the database\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
r \-\- List all non\-hidden regions in the database\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
s \-\- List all non\-hidden primitives in the database\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
p \-\- List all non\-hidden primitives in the database\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
l \-\- Use long format showing object name, object type, major type, minor type, and length\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
H \-\- When printing using long format, use human readable sizes for object size\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
S \-\- Sort using object size rather than object name\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
q \-\- Suppress informational output messages during database lookup process
.RE
.PP
The
\fBls\fR
command is a synonym for the
\fBt\fR
command\&. Note that when any of the above options are used, the output is not formatted\&.
.SH "EXAMPLES"
.PP
The examples show the use of the
\fBls\fR
command and its options to list objects, primitives, regions, or combinations having a specific object\&.
.PP
\fBExample\ \&1.\ \&List all objects beginning with a particular name.\fR
.PP
mged> \fBls shape*\fR
.RS 4
Lists all objects with names beginning with "shape" (output is formatted)\&.
.RE
.PP
\fBExample\ \&2.\ \&List all objects beginning with a particular name.\fR
.PP

mged>\fBls \-a shape*\fR
.PP
Lists all objects with names beginning with "shape\&."
.PP
\fBExample\ \&3.\ \&List all primitives beginning with a particular name.\fR
.PP

mged>\fBls \-p wheel*\fR
.PP
Lists all primitives with names beginning with "wheel\&."
.PP
\fBExample\ \&4.\ \&List all regions beginning with a particular name.\fR
.PP

mged>\fBls \-r wheel*\fR
.PP
Lists all regions with names beginning with "wheel\&."
.PP
\fBExample\ \&5.\ \&List all combinations beginning with a particular name.\fR
.PP

mged>\fBls \-c suspension*\fR
.PP
Lists all combinations with names beginning with "suspension\&."
.PP
\fBExample\ \&6.\ \&List all regions having particular attributes.\fR
.PP

mged>\fBls \-A \-o \-r Comment{First comment} Comment{Second comment}\fR
.PP
Lists all regions that have a "Comment" attribute that is set to either "First comment" or "Second comment\&."
.SH "AUTHOR"
.PP
BRL\-CAD Team
.SH "BUG REPORTS"
.PP
Reports of bugs or problems should be submitted via electronic mail to
devs@brlcad\&.org
