folder Command
Purpose
Selects and lists folders and messages.
Syntax
Description
The folder command sets the current folder and the current message for that folder, and lists information about your folders. By default, the folder command lists the current folder name, the number of messages, the range of the message numbers, and the current message.
The folder that is specified by the
+Folder flag becomes the current folder. The message that is
specified by the Message parameter becomes the current message for the folder.
Use the -pack flag to renumber the messages in a folder.
Flags
| Item | Description |
|---|---|
| -all | Displays a line of information about each folder in your mail directory. |
| -fast | Displays only the names of the folders. |
+Folder |
Specifies the folder information to display. |
| -header | Displays column headings for the folder information. |
| -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.
|
| -list | Displays the current folder followed by the contents of the folder stack. |
| Message | Sets the specified message as the current message. Unless you specify the
+Folder flag, the command sets the specified message for the current folder. Use the
following references to specify a message:
|
| -nofast | Displays information about each folder. This flag is the default. |
| -noheader | Suppresses column headings for the folder information. This flag is the default. |
| -nolist | Suppresses the display of the folder-stack contents. This flag is the default. |
| -nopack | Prevents renumbering of the messages in the folder. This flag is the default. |
| -noprint | Prevents display of folder information. If the -push, -pop, or -list flag is specified, the -noprint flag is the default. |
| -norecurse | Displays information about the top-level folders in your current folder only. Information about subfolders is not displayed. This flag is the default. |
| -nototal | Prevents display of the total of all messages and folders in your mail directory structure. When the -all flag is specified, the default is the -total flag; otherwise, the -nototal flag is the default. |
| -pack | Renumbers the messages in the specified folder. Renumbering eliminates gaps in the message numbering after messages are deleted. |
| -pop | Removes the folder from the top of the folder stack and makes it the current folder. The
+Folder flag cannot be specified with the -pop flag. |
| Displays information about the folders. If the -push, -pop, or -list flag is specified, the -noprint flag is the default; otherwise, the -print flag is the default. | |
| -push | Moves the current folder to the top of the folder stack and sets the specified folder as the current folder. If no folder is specified, the -push flag swaps the current folder for the folder on top of the folder stack. |
| -recurse | Displays information about all folders and subfolders in your current folder. |
| -total | Displays all messages and folders in your mail directory structure. The
-total flag does not display information for subfolders unless you specify the
-recurse flag. The -total flag is the default if the
-all flag is specified. |
Profile Entries
The following entries are entered in the UserMhDirectory/.mh_profile file:
| Item | Description |
|---|---|
Current-Folder: |
Sets the default current folder. |
Folder-Protect: |
Sets the protection level for the new folder directories. |
Folder-Stack: |
Specifies the folder stack. |
lsproc: |
Specifies the program that is used to list the contents of a folder. |
Path: |
Specifies the user's MH directory. |
Security
Attention RBAC 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 that are associated with this command, see the lssecattr
command or the getcmdattr subcommand.
Examples
- To display information about the current folder, enter:
The system responds with a message similar to the following:folder
In this example, the current folder isinbox+ has 80 messages (1-82); cur = 7; (others).inbox. The folder contains80 messages, ranging from message1to message82. The current message number is7. - To display information about all folders, enter:
The system responds with a message similar to the following:
folder -all
In this example, there areFolder # of messages (range); cur msg (other files) inbox+ has 80 messages (1-82); cur= 7; (others). test has 5 messages (1-5); cur= 5; (others). Total= 85 messages in 2 folders2folders containing a total of85messages. The current folder isinbox, indicated by the+(plus sign) that follows it. - To make the
testfolder the current folder and display information abouttest, enter:The system responds with a message similar to the following:folder +testtest+ has 5 messages (1-5); cur = 5; (others) - To make the message
2the current message in the current folder, enter:
The system responds with a message similar to the following:folder 2test+ has 5 messages (1-5); cur = 2; (others) - To create a folder called
groupand make it the current folder, enter:The system responds with a message similar to the following:folder +group
Enter:Create folder "/home/dawn/Mail/group"? _
The system responds with a message similar to the following:yesgroup+ has no messages. - To renumber the messages in the current folder, enter:
The system responds with a message similar to the following:
folder -pack
In this example, the messages are renumbered to eliminate gaps in the message numbering after messages are deleted.inbox+ has 80 messages (1-80); cur= 7; (others).
Files
| Item | Description |
|---|---|
| $HOME/.mh_profile | Contains the MH user profile. |
| /usr/bin/folder | Contains the folder command. |