Remove objects from the global database or from a combination's tree.
NOTE: currently rm will delete a list of objects from a combination if the combination name is provided as the first argument and no options override this behavior. This mode is deprecated and will be removed in a future release.
- -f, --force
Remove all objects specified, even if a particular object is a comb with a non-empty tree. Also impacts recursive removal - see "-r".
- -r, --recursive
Recursively delete objects in combination objects specified in the paths list. If neither of the forcing options are enabled, do the deletions while checking to see if objects in the combination tree in question are used in other hierarchies in the .g file. Any objects in use elsewhere will be skipped.
- -v [#], --verbose [#]
Control the verbosity of reporting during a rm operation. Repeated specification of -v option will increase verbosity of reporting.
- -n, --no-op
Reports what operations would be performed without actually carrying them out on the .g file.
Paths in the rm command may take one of two forms: a single object name, or a "full path" form: /group/parent/obj. If the path specifier is of the latter form, then obj is removed not from the global database but from the parent in question. Path entries above parent are ignored. Note that full path arguments will not be incorporated into recursive deletion requests. (TODO - implement globbing behavior so /gr*/p*nt/obj* will do what is expected.)
The example shows the use of the rm command to delete all occurrences of specified members of a given combination.
Example 1. (DEPRECATED) Delete members of a given combination.
rm group1 regiona
Deletes regiona from group1.
Example 2. Safe recursive removal of a combination.
rm -r regiona
Deletes regiona and any objects in the regiona hierarchy that are not in use elsewhere in the .g file..
Example 3. Forced recursive removal of a combination.
rm -rf regiona
Deletes regiona and any objects in the regiona hierarchy, regardless of other uses in the .g file. Note that this can leave dangling references to removed objects in other combs.