uucleanup Command
Purpose
Deletes selected files from the Basic Networking Utilities (BNU) spooling directory.
Syntax
uucleanup [ -CDays ] [ -WDays ] [ -mString ] [ -DDays ] [ -TDays ] [ -XDays ] [ -o Days] [ -sSystemName ]
Description
The Basic Networking Utilities (BNU) uucleanup command scans the spooling directory (/var/spool/uucp) for files that are older than a specified number of days and removes them. The uucleanup command performs the following tasks:
- Informs the requester of send and receive requests for systems that cannot be reached.
- Warns users about requests that have been waiting for a given number of days. The default is 1 day.
- Returns to the sender mail that cannot be delivered.
- Removes from the spool
directory all other files older than a specified number of days. Requirements:
- Only someone with root user privileges can issue the uucleanup command from the command line. The uucleanup command is not usually entered on the command line but is executed by the uudemon.cleanu command, a shell procedure.
- When BNU is installed, automatic cleanup is not enabled. Edit the /var/spool/cron/crontabs/uucp file and remove the comment character (#) from the beginning of the uudemon.cleanu line to instruct the cron daemon to start the uudemon.cleanu command.
Flags
Item | Description |
---|---|
-CDays | Removes C.* (command) files as old as, or older than, the number of days specified by the Days variable, and notifies the requester that the files have been deleted. The default time is 7 days. |
-DDays | Removes D.* (data) files as old as, or older than, the number of days specified by the Days variable. Also attempts to deliver any remaining mail messages. The default time is 7 days. |
-mString | Includes a specified line of text in the warning message generated by the -WDays option. The default line is See your local administrator to locate the problem. |
-oDays | Removes other files as old as, or older than, the number of days specified by the Days variable. The default time is 2 days. |
-sSystemName | Executes the uucleanup command only on the spooling
directory specified by the System variable. The default is
to clean up all BNU spooling directories. Restriction: System names can contain only ASCII characters.
|
-TDays | Removes TM.* (temporary) files as old as, or older than, the number of days specified by the Days variable. Also attempts to deliver any remaining mail messages. The default time is 7 days. |
-WDays | Sends an electronic mail message to the requester warning that C.* (command) files as old as, or older than, the number of days specified by the Days variable are still in the spooling directory. The message includes the job ID and, if the request included mail, the mail message. The administrator can use the -m option to include a message line telling whom to call to check the problem. The default time is 1 day. |
-XDays | Removes any X.* (execute) files as old as, or older than, the number of days specified by the Days variable. The default time is 2 days. |
Examples
Warning Users That Their Command Files Have Not Been Sent
- To send a warning for C.* (command)
files 2 or more days old, enter: uucleanup -W2This warns the requester that the files have not been sent.
- To send a message with
the warning, enter: uucleanup -m"Check these files waiting in the BNU job queue."This locates C.* (command) files 1 or more days old (default), warns requesters that their files have not been sent, and gives the message: Check these files waiting in the BNU job queue.
Cleaning Up Command, Data, Execute, and Miscellaneous Files
- To clean up command
files 5 or more days old, enter: uucleanup -C5This removes all C.* (command) files 5 or more days old and sends an appropriate message to the requesters.
- To clean up data and execute files 3 or more days old, enter: This removes all D.* (data) files and all X.* (execute) files 3 or more days old.
- To clean up all files
at once using defaults, enter:
This removes all C.*, D.*, T.*, and X.* files, and all other files older than the default times.uucleanup
Important: Whenever the -C and -W flags are used together, make sure the value specified for the -W flag is less than that for the -C flag. Otherwise, the -C flag will delete all the C.* (command) files before any warnings can be printed.
Cleaning Up Files for a Specific System
To delete files for one system, enter:
uucleanup -shera
This removes all files using defaults for system hera, but does not remove any files for any other systems.
Files
Item | Description |
---|---|
/usr/sbin/uucp/* | Contains the uudemon.cleanu shell procedure and all the configuration files for BNU. |
/var/spool/cron/crontabs/uucp | Schedules BNU jobs for the cron daemon, including the uudemon.cleanu shell procedure. |
/var/spool/uucp/* | Contain files removed by the uucleanup command. |