07/24/90  library_cleanup, lcln

Syntax as a command:  lcln {search_names} {-control_args}


Function:  deletes library entries that are no longer needed.
Segments, links, and multisegment files can be deleted in this manner.

Library entries that have not been modified since the last bootload
and that match one or more search name arguments are selected as
candidates for possible deletion.  If they have also not been modified
within a given grace period, then they are eligible for deletion.

By default, library_cleanup only lists the entries eligible for
deletion.  The -delete control argument must be given to cause deletion
of these entries.

This command uses a library descriptor and library search procedures.
See "The Library Descriptor Commands" on the Multics Library
Maintenance manual (AN80) for more information.


Arguments:
search_names
   are entrynames that identify the library entries that are candidates
   for deletion.  The Multics star convention can be used to identify a
   group of entries with a single search name.  Up to 30 search names
   can be given in the command.  If none are given, then any default
   search names specified in the library descriptor are used.


Control arguments:
-delete, -dl
   causes the library entries that are eligible for deletion to be
   deleted.
-descriptor desc_name, -desc desc_name
   gives a pathname or reference name that identifies the library
   descriptor describing the libraries to be searched.  If no
   -descriptor control argument is given, then the default library
   descriptor is used.


-library library_name, -lb library_name
   identifies a library that is to be searched for entries to be
   deleted.  The Multics star convention can be used to identify a
   group of libraries with a single library name.  Up to 30 -library
   control arguments can be given in each command.  If none are given,
   then any default library names specified in the library descriptor
   are used.
-list, -ls
   causes the library entries that are eligible for deletion to be
   printed on the user's terminal.  This is the default if -delete,
   -list, or -long is not given.


-long, -lg
   causes all library entries that match the search names to be printed
   on the user's terminal, even if they are not eligible for deletion
   according to their date/time entry modified.  Entries that are
   eligible for deletion are flagged with an asterisk (*).
-search_name search_name
   identifies a search name that begins with a minus (-) to distinguish
   the search name from a control argument.  There are no other
   differences between the search names described above and those given
   with the -search_name control argument.  One or more -search_name
   control arguments can be given in the command.
-time days, -tm days
   gives a minimum grace period in days.  The actual grace period is
   determined by the greater of the time since the last bootload and
   the specified value.  Matching library entries whose date/time
   entry modified falls within this grace period are not eligible for
   deletion.  The default grace period is seven days.


Notes:  If -delete and -list are used together, then the library
entries being deleted are printed on the user's terminal.

If an entry that is eligible for deletion resides in an inner ring,
library_cleanup must call the restricted installation_tools_ gate to
change its ring brackets prior to deleting it.  If the user does not
have access to this gate, then the entry is not deleted, and a linkage
error occurs.
