mhpath Command

Purpose

Prints full path names of messages and folders.

Syntax

mhpath [ +Folder ] [ Messages [ ,Messages ] ... ]

Description

The mhpath command lists the path names of folders and messages. By default, the command lists the path name of the current folder.

Flags

Item Description
+Folder Specifies which folder path to list.
-help Lists the command syntax, available switches (toggles), and version information.

Note: For MH, the name of this flag must be fully spelled out.

Messages Specifies the messages for which you want to list path names. The Messages parameter can specify several messages, a range of messages, or a single message. Use the following references to specify messages.
Number
Number of the message. When specifying multiple messages, separate each message number with a comma. When specifying a range of messages, separate the upper and lower ends of the range with a hyphen.

Note: You cannot use the new variable when specifying a range.

Sequence
A group of messages specified by the user. Recognized values include:
all
All the messages in a folder.
cur or . (period)
Current message.
first
First message in a folder.
last
Last message in a folder.
new
Path name that the system will assign to the next message that is incorporated.
next
Message following the current message.
prev
Message immediately before the current message.

Profile Entries

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

Item Description
Current-Folder: Sets the default current folder.
Path: Specifies a 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

  1. To list the path name of the current folder, enter:
    mhpath
    The system responds with a message similar to the following:
    /home/tom/Mail/inbox
  2. To list the path names for messages 2 through 4 in the source folder, enter:
    mhpath  +source 2-4
    The system responds with a message similar to the following:
    /home/tom/Mail/source/2
    /home/tom/Mail/source/3
    /home/tom/Mail/source/4
  3. To list the path name the system will assign to the next message added to the current folder, enter:
    mhpath new
    The system responds with a message similar to the following:
    /home/tom/Mail/source/5
    In this example, the next message will be message 5 in user tom's current folder, /home/tom/Mail/source.

Files

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