Manual Page Search Parameters

MSORT(1) General Commands Manual MSORT(1)

sort messages

msort [-r] [-f | -d | -s | -F | -M | -S | -U | -I] [msgs ...]

msort sorts messages according to various orders, and prints, separated by newlines, the resulting message names. (See mmsg(7) for the message argument syntax.)

If no messages are specified, msort will read filenames from the standard input, or use the default sequence if used interactively.

The options are as follows:

Reverse order.
Sort by ‘From:’.
Sort by date.
Sort by ‘Subject:’ (modulo various variants of ‘Re:’).
Sort by filename, using proper order for numbers in filenames.
Sort by message file modification time.
Sort by message file size.
Sort unread messages after read messages.
Sort flagged messages before unflagged messages.

The msort utility exits 0 on success, and >0 if an error occurs.


Leah Neukirchen <>

msort is in the public domain.

To the extent possible under law, the creator of this work has waived all copyright and related or neighboring rights to this work.

July 22, 2016 x86_64