Warning: This article is meant for iSeries Systems Administrators only. Purging files from the IFS will permanently remove them from the system. This cannot be undone and can result in undesired behavior.
Reason for this Article
We have had several customers express a desire to purge out the documents sitting in the RJSTEMP directory. As these are typically only temporary files, we wanted to provide information on not only ''how'' to purge this directory, but ''when'' to purge this directory.
What is the RJSTEMP Directory and How is it Used?
The RJSTEMP directory is a directory that is created on the root ('/') of the IFS by RJS Software Products and is used as a temporary working folder for many RJS Software Systems solutions.
The RJSTEMP directory can be accessed by running the following command:
WRKLNK '/RJSTEMP'
Place a '5' next to the folder when it appears and press Enter.
When to Purge the RJSTEMP Directory
Since the RJSTEMP directory is a working directory for many RJS Software Systems solutions, care should be taken when purging the RJSTEMP directory. Do not run a purge command if there are any RJS Software Systems solutions currently running on the iSeries or on a Server that is connecting to the iSeries as it could cause those applications to error and/or hang.
It is strongly recommended that you limit the purging process to one of two possible occasions:
- If your company typically allows most of their jobs to end at night and use a scheduler to start them off again early in the morning, you could schedule the purge command to run before you start up the jobs running RJS Software Systems solutions.
- When you IPL your iSeries, the purge command can be added to your system start-up before the typical jobs get started.
How to Purge the RJSTEMP Directory
The command below will allow you to purge a single file or an entire directory of files on the IFS. Due to the fact that this command is extremely easy to use and the fact that it permanently removed files from the IFS, please make sure that you have read the security warnings and suggestions above.
To Purge a Single File from the IFS
The following example assumes that I want to purge the file TEST.PDF from the '/RJSTEMP' directory on the IFS.
Example:
RMVLNK OBJLNK('/RJSTEMP/TEST.PDF')
To Purge All Files from Single Directory on the IFS
The following example assumes that I want to purge all the files from the '/RJSTEMP' directory on the IFS.
Example:
RMVLNK OBJLNK('/RJSTEMP/*')
To Purge All Files from Single Directory on the IFS
The following example assumes that I want to purge all the files that start with the letters "RJS" from the '/RJSTEMP' directory on the IFS.
Example:
RMVLNK OBJLNK('/RJSTEMP/RJS*')