LS(nged)

The command with no object argument lists the name of every object in the database (in alphabetical order) except for those marked as hidden with the hide command. If the object argument is…

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… NAME (aka what is this girl)

ls β€” the command that lists every object in the database for you, bestie. With no object argument it lists the name of every object (in alphabetical order) except the ones you marked as hidden with the hide command. If you do pass an object argument, only those objects get listed. Slay.


✨ SYNOPSIS ✨

ls [-A -o -a -c -r -s -p -l -q -H -S] [objects]

πŸŽ€ DESCRIPTION πŸŽ€

okay so. no object argument? The command lists the name of every object in the database β€” alphabetical order, gorgeous β€” minus anything you marked as hidden with the hide command. Give it an object argument and only those objects show up. And the object argument can include regular expressions. Iconic.

Now the -A option, listen up: when you use it, the arguments are expected to be a list of attribute name/value pairs, and it lists the objects that have attributes matching the list you gave. By default an object has to match all the specified attributes to get listed, but the -o flag flips that β€” it means an object matching at least one attribute name/value pair gets listed. Wanna know how to set or get attributes? Go see the attr command, she explains it. Also, real talk: regular expressions are not supported for attributes. periodt.

The following options are also allowed:

  • -h, β€”help β€” Print help and exit. Short and sweet. 🫢
  • -a, β€”all β€” List all objects in the database. Every single one. no cap.
  • -c, β€”combs β€” List all non-hidden combinations in the database.
  • -r, β€”regions β€” List all non-hidden regions in the database.
  • -s, -p, β€”primitives β€” List all non-hidden primitives in the database.
  • -l β€” Long format time ✨ shows object name, object type, major type, minor type, and length.
  • -H, β€”human-readable β€” when you're printing in long format, use human-readable sizes. Your brain will thank you.
  • -S, β€”sort β€” sort using object size instead of object name. Chaotic but valid.
  • -A, β€”attributes β€” list objects having all of the specified attribute name/value pairs.
  • -o, β€”or β€” in attribute mode, match objects having at least one listed attribute pair.
  • -q, β€”quiet β€” suppress informational output messages during database lookup. shhh 🀫

Also, the same listing behavior is exposed by the separate t entry. iykyk.

⚠️ heads up bestie: when any of the above options are used, the output is not formatted. πŸ’€

🌸 EXAMPLES 🌸

These examples show the use of the ls command and its options to list objects, primitives, regions, or combinations having a specific object.

Example 1. List all objects beginning with a particular name.

mged> ls shape*

Lists all objects with names beginning with "shape" (output is formatted). cute!

Example 2. List all objects beginning with a particular name.

mged>ls -a shape*

Lists all objects with names beginning with "shape."

Example 3. List all primitives beginning with a particular name.

mged>ls -p wheel*

Lists all primitives with names beginning with "wheel."

Example 4. List all regions beginning with a particular name.

mged>ls -r wheel*

Lists all regions with names beginning with "wheel."

Example 5. List all combinations beginning with a particular name.

mged>ls -c suspension*

Lists all combinations with names beginning with "suspension."

Example 6. List all regions having particular attributes.

mged>ls -A -o -r Comment{First comment} Comment{Second comment}

Lists all regions that have a "Comment" attribute that is set to either "First comment" or "Second comment." Obsessed with her honestly.


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” the main characters.


πŸ¦‹ BUG REPORTS πŸ¦‹

Found a bug? 😭 Don't suffer in silence β€” reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. They'll fix it fr fr.


and that's the page, babe πŸ’– β€” this lil love letter comes to you straight from BRL-CAD and it's the LS(nged) page. mwah. πŸŽ€βœ¨

πŸ“¦ where this page comes from