OES2015sp1, Customer needs to purge deleted files on NSS by age or file extension.

  • 7018151
  • 13-Oct-2016
  • 13-Oct-2016


Novell Open Enterprise Server 2015 (OES 2015) Linux Support Pack 1


Customer needs to purge deleted files on NSS by age or file extension.



Use this utility to perform the purge operation.


This section describes the OPTION, AOPTION, PAOPTION, and POPTION options available in the SPUTIL utility.

NOTE:The command action is irreversible.
General Options (OPTION)

Option              Description
--force              Performs the purge operation by suppressing all user confirmations.
--dry-run          Use this option to display the total number of files that could be purged from volumes and the total space that could be reclaimed in a pool after purging.

-h, --he            Displays the help information.

Action Options (AOPTION)
Option              Description

--purge             Invokes the purge operation.

Purge Action Options (PAOPTION)
Option              Description
--get                 Lists the volume configurations.
--set                 Sets the volume configurations.
--exec              Executes the operations based on the configurations that have been preset.
                        NOTE:To obtain the statistics information, run --dry-run option
--clear              Removes the file extension that is configured during the set operation.

Purge Options (POPTION)
Option             Description
-e, --ext           Specify the file extension. It is mandatory to specify a meaningful name for the extension. If you specify “*”, “.” and so on as extension, the behavior of the operation is undefined. For example:
                        --ext doc --ext txt

-a, --age            Specify the age in seconds(s), minutes(m), hours(h), or days(d). Any file that is older than the specified age is purged. The default value is in days. If the value is 0, no purge action is performed. The maximum age is 49710 days. For example:
                             -a 30s
                             -a 30m
                             -a 20h
                              -a 300d
                              -a 0

-p, --poolname       Specify the pool name.
-v, --volname          Specify the volume name.


To list all the pools and volume configurations:
                sputil --purge --get

To set the configuration for purge operation with the age as “250d”, file extension as “doc”, and volume name as “VOL1”:
                sputil --purge --set --age 250d --ext doc --volname VOL1

NOTE:In the preceding example, the purge operation is performed if any one of the following conditions are met:
-Files that are older than 250 days.
-Files with “doc” extension.

To clear the configuration with file extensions as “doc” and “txt”, and volume name as “VOL1” for purge operation:
                  sputil --purge --clear -e doc -e txt -v VOL1

To execute the purge operation based on the configurations that have been preset:
                 sputil --purge --exec

To execute the purge operation for the volume “VOL1”:
                 sputil --purge --exec -v VOL1

To display the statistics information:
                 sputil --purge --exec --dry-run

This command displays only the statistics information. It does not perform the --exec operation.

    -You can perform any one of the following operations in a single command: get, set, exec, or clear.
    -Pool name and volume name cannot be specified together in a single command.
    -If you need to perform purge operation periodically, use crontab command.