[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 5

uuclean Command

Purpose

Removes files from the BNU spool directory.

Syntax

/usr/sbin/uucp/uuclean [ -m ] [ -nHours ] [ -pPrefix ] [ -dSubdirectory ]

Description

The uuclean command checks the Basic Networking Utilities (BNU) spool directory (/var/spool/uucp) for files with the specified prefixes and deletes those that are older than the given number of hours. If the -nHours flag is not included, the uuclean command deletes files that are older than 72 hours.

If the -p flag is not included, the uuclean command deletes all files in the specified subdirectories of the spool directory that meet the age requirement. If the -d flag is not included, the command deletes all the files (that meet the age and prefix requirements) in all the subdirectories of the spool directory. Thus if neither the -d or the -p flag is included, the uuclean command deletes all files in all subdirectories of the /var/spool/uucp directory that meet the age requirement.

If the -m flag is not specified, the uuclean command sends mail to owners of all command (C.*) files that it deletes. If the -m flag is specified, the command sends mail to the owner of each file it deletes, including data (D.*) and execute (X.*) files. The mail message includes the name of the deleted file.

The uuclean command is usually run by the cron daemon.

Note: Only someone with root user authority or who is logged in as uucp can issue the uuclean command.

Flags

-dSubdirectory Deletes files from the specified subdirectory of the /var/spool/uucp directory if they match specifications given with the -n and -p flags. If the -d flag is not specified, the uuclean command checks all subdirectories of the /var/spool/uucp directory. Up to 10 subdirectories can be specified with the -d flag.
-m Instructs the uuclean command to send mail to the owner of each file when it is deleted.
-nHours Deletes files whose ages are more than the number of hours specified by the Hours variable, if they match specifications given with the -d and -p flags. The default is 72 hours.
-pPrefix Deletes files with the prefix given by the Prefix variable, if they match specifications given with the -n and -d flags. Up to 10 prefixes can be specified with the -p flag.

Examples

  1. To delete all old command files, enter:
    /usr/sbin/uucp/uuclean -pC
    This command deletes all files in all subdirectories of the /var/spool/uucp directory whose names begin with C and that are older than 72 hours (the default). The system sends mail to the original owner of each file, stating that the file has been deleted.
  2. To delete all old files from the spool directory for systems venus and nostromo, enter:
    /usr/sbin/uucp/uuclean -n84 -dvenus -dnostromo
    This command deletes all files in the /var/spool/uucp/venus and /var/spool/uucp/nostromo directories that are older than 84 hours. By default, the system notifies owners of C.* files that the files have been deleted; however, it does not notify owners of other files it deletes.
  3. To delete all old files from all spool directories and notify users that they have been deleted, enter:
    /usr/sbin/uucp/uuclean -m
    This command deletes all files in all subdirectories of the spool directory, if the files are older than 72 hours (the default). It sends mail to the owner of each file it deletes.
  4. To schedule the uuclean command to be started periodically by the cron daemon, add an entry similar to the following to your /var/spool/cron/crontabs/uucp file:
    15 22 * * * /usr/sbin/uucp/uuclean -n96 -pC -pD -pX
    This entry will cause the cron daemon to start the uuclean command at 22:15 (10:15 p.m.) daily. The uuclean command will delete all command (C.*), data (D.*), and execute (X.*) files that are older than 96 hours from all subdirectories of the spool directory.

Files

/usr/sbin/uucp/uuclean Contains the uuclean command.
/var/spool/uucp /* Contains spooling files removed by the uuclean command.
/var/spool/cron/crontabs/uucp Schedules uucp jobs for the cron daemon.

Related Information

The uucp command, uux command, uucleanup command, uudemon.cleanu command.

The uucico daemon, cron daemon.

Understanding the BNU File and Directory Structure, Using BNU Maintenance Commands in AIX Version 4.3 System Management Guide: Communications and Networks.


[ Previous | Next | Contents | Glossary | Home | Search ]