rmf Command

Purpose

Removes folders and the messages they contain.

Syntax

rmf+ Folder ] [  -interactive -nointeractive ]

Description

The rmf command deletes the messages within the specified folder and then deletes the folder. By default, the rmf command confirms your request before deleting a folder. If the folder contains files that are not messages, the rmf command does not delete the files and returns an error.

Attention: The rmf command irreversibly deletes messages that do not have other links.

By default, the rmf command removes the current folder. When the current folder is removed, inbox becomes the current folder. If the +Folder flag is not specified, and the rmf command cannot find the current folder, the command requests confirmation before removing the +inbox folder.

The rmf command does not delete any folder or any messages in a folder to which you have read-only access. The rmf command deletes only your private sequences and your current message information from the profile.

The rmf command does not delete folders recursively. You cannot remove subfolders by requesting the removal of a parent folder. If you remove a subfolder, the parent of that folder becomes the current folder.

Flags

Item Description
+Folder Specifies the folder to be removed.
-help Lists the command syntax, available switches (toggles), and version information.
Note: For Message Handler (MH), the name of this flag must be fully spelled out.
-interactive Requests confirmation before removing the folder. If the +Folder flag is not specified, this is the default.
-nointeractive Removes the folder and its messages without requesting confirmation. This is the default.

Profile Entries

The following entries are entered in the UserMhDirectory/.mh_profile file:

Item Description
Current-Folder: Sets the default current folder.
Path: Specifies the user's MH directory.

Security

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

Attention: The rmf command irreversibly deletes messages that do not have other links.
  1. To remove the current folder called status, enter:
    rmf
    The system responds with a message similar to the following:
    Remove folder "status"?
    If you do want the folder removed, enter yes. The system responds with a message similar to the following:
    [+inbox now current]
  2. To remove the meetings folder noninteractively, enter:
    rmf +meetings

Files

Item Description
$HOME/.mh_profile Defines the MH user profile.
/usr/bin/rmf Contains the rmf command.