Remove Files
AMPS provides the following module for removing files. Use this action to remove error log files that are no longer needed. AMPS loads this module by default.
This action removes files that match an arbitrary pattern. If the pattern is not specified carefully, this action can remove files that contain important data, are required for AMPS, or are required by the operating system.
This action cannot be used to safely remove journal files (also known as transaction log files). Use the actions described in Manage Transaction Log Journal Files for these files.
Module Name | Does |
---|---|
| Removes files that match the specified pattern that are older than the specified age. This action accepts an arbitrary pattern, and removes files that match that pattern. While AMPS attempts to protect against deleting journal files, using a pattern that removes files that are critical for AMPS, for the application, or for the operating system may result in loss of data. The module does not recurse into directories. It skips open files. The module does not remove AMPS journals (that is, files that end with a The commands to remove files are executed with the current permissions of the AMPS process. |
This module requires an Age
parameter that specifies the age of the files to remove, as determined by the update to the file. This module also requires a Pattern
parameter that specifies a pattern for locating files to remove.
Parameter | Description |
---|---|
| Specifies the age of files to process. The module removes any file older than the specified For example, when the There is no default for this parameter. |
| Specifies the pattern for files to remove. The module removes any files that match the specified This parameter is interpreted as a Unix shell globbing pattern. It is not interpreted as a regular expression. As with other parameters that use the file system, when the pattern specified is a relative path, the parameter is interpreted relative to the current working directory of the AMPS process. When the pattern specified is an absolute path, AMPS uses the absolute path. There is no default for this parameter. |
| Specifies the number of files that meet the There is no default for this parameter. When both |
| Specifies the maximum number of files that meet the There is no default for this parameter. When both |
This module does not add any variables to the AMPS context.
Last updated