![](/images/new-backgrounds/1109566/109566153x1.webp)
A. OLCmd Reference
OLCmd clean
The clean command creates archive copies of specified log files and deletes archived files older than a specified age.
Format:
OLCmd clean directory extension days
Where: |
|
directory | Is the directory where the log files reside. |
extension | Is the suffix of the log files to be archived. |
days | Is the number of days old existing archive files must be for |
| the clean command to delete them. |
| Is an optional name to be added to the suffix of archived |
| files. It is also used to identify files to be deleted. If |
| |
| presumed. |
Example:
The following command moves files in the \opt\pdn\openlane\logs directory named *.log to *.log_<date>.arc (for example, database.log_2001_05_13.arc) and deletes any *.arc files older than 7 days.
OLCmd clean logs .log 7
The following command moves files in the \opt\apache\logs directory named *.log to *.log_<date>admin (for example, jserv.log_2001_05_13admin) and deletes any *.log_<date>admin files older than 21 days.
OLCmd clean \opt\apache\logs .log 21 admin
| January 2002 |