packf Command

Purpose

Compresses the contents of a folder into a file.

Syntax

packf [ +Folder ] [ Messages ] [ -file File ]

Description

The packf command compresses the messages in a folder into a specified file. By default, the packf command compresses messages from the current folder and places them in the msgbox file. If the file does not exist, the system prompts you for permission to create it. Each message in the file is separated with four Ctrl-A characters and a new-line character.

Note: You can use the inc command to unpack compressed messages.

Flags

Item Description
-file File Specifies the file in which to put compressed messages. The default is the ./msgbox file. If the file exists, the packf command appends the messages to the end of the file. Otherwise, the system prompts you for permission to create the file.
+Folder Identifies the folder containing the messages you want to pack.
-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.
Messages Specifies what messages to pack. The Messages parameter can specify several messages, a range of messages, or a single message. If several messages are specified, the first message packed becomes the current message. Use the following references to specify messages:
Number
Number of the message. When specifying several messages, separate each number with a space. When specifying a range, separate the first and last numbers in the range with a hyphen.
Sequence
A group of messages specified by the user. Recognized values include:
all
All the messages in the folder. This is the default.
cur or . (period)
Current message.
first
First message in a folder.
last
Last message in a folder.
next
Message immediately after 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 your default current folder.
Msg-Protect: Sets the protection level for your new message files.
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

  1. To pack all the messages in the current folder and place the resulting text in the schedule file, enter:

    packf  -file schedule

    The system responds with a message similar to the following:
    Create file "/home/mary/schedule"?
    Enter y to create the file.
  2. To pack the range of messages from 3 to 7 from the test folder into an existing msgbox file, enter:

    packf  +test 3-7

    The system responds with the shell prompt when the command is complete.
  3. To pack the current, first, and last message in the inbox folder into an existing msgbox file, enter:
    packf cur first last

Files

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