prev Command

Purpose

Shows the previous message.

Syntax

prev [ +Folder ] [ -header | -noheader ] [ -showproc CommandString | -noshowproc ]

Description

The prev command displays the previous message in a folder. The prev command is similar to the show command with the prev value specified.

The prev command passes any flags that it does not recognize to the showproc program.

Flags

Item Description
+Folder Specifies the folder that contains the message you want to show.
-header Displays a one-line description of the message being shown. The description includes the folder name and the message number. This flag is the default.
-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.
-noheader Prevents display of a one-line description of each message.
-noshowproc Uses the /usr/bin/cat command to list the previous command.
-showproc CommandString Uses the specified command string to perform the listing.

Profile Entries

The following entries are part of the UserMhDirectory/.mh_profile file:

Item Description
Current-Folder: Sets the default current folder.
Path: Specifies the UserMhDirectory.
showproc: Specifies the program used to show messages.

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

  1. To display the previous message in the current folder, enter:
    prev
    The system responds with a message similar to the following:
    (Message schedule: 10)
    The text of the message is also displayed. In this example, message 10 in the current folder schedule is the previous message.
  2. To show the previous message in the meetings folder, enter:

    prev  +meetings

    The system responds with a message similar to the following:
    (Message inbox: 5)
    In this example, message 5 in the meetings folder is the previous message.

Files

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