prm - delete a file or files on a cluster of machines


prm [-dfrPRW] [-g nodegroup1,...,nodegroupN] [-w node1,...,nodeN] [-x node1,...,nodeN] file ...


The prm utility can be used to delete files or directories on a cluster of machines. The following options are available:

Attempt to remove directories as well as other types of files.

Attempt to remove the files without prompting for confirmation, regardless of the file's permissions. If the file does not exist, do not display a diagnostic message or modify the exit status to reflect an error.

Overwrite regular files before deleting them. Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted.

Attempt to remove the file hierarchy rooted in each file argument. The -R option implies the -d option.

Equivalent to -R.

Attempts to undelete the named files. Currently, this option can only be used to recover files covered by whiteouts.

If the -g option is specified, followed by a comma separated list of group names, the command will only be run on that group of nodes. A node may be a part of more than one group if desired, however running without the -g option will run the command on the same node as many times as it appears in the file specified by the CLUSTER environment variable. This option is silently ignored if used with the -w option.

If the -w option is specified, followed by a comma delimited list of machine names, the command will be run on each node in the list. Without this flag, prm runs on the nodes listed in the file pointed to by the CLUSTER environment variable.

The -x option can be used to exclude specific nodes from the cluster. The format is the same as the -w option, a comma delimited list of machine names. This option is silently ignored if used with the -w option.


prm utilizes the following environment variables.

Contains a filename, which is a newline separated list of nodes in the cluster.

Command to use to connect to remote machines. The command chosen must be able to connect with no password to the remote host. Defaults to rsh


Exit status is 0 on success, 1 if an error occurs.


dsh(1), rm(1), rsh(1), kerberos(3), hosts.equiv(5), rhosts(5)


The prm command appeared in clusterit 1.0. It is based on the prm command in IBM PSSP.


Prm was written by Tim Rightnour.


Some of the more advanced options, like the -P option, may not be available in some versions of rm(1). Consult the rm(1) manpage on the remote host if you have problems.