MU(MV)

NAME
mu mv- move a message file to a Maildir

SYNOPSIS
mu mv [--flags=<flags>] [--printtarget] <source-path> <target-maildir>

DESCRIPTION
mu mv is the mu sub-command for moving mail files to new directories. It does not use the mu database. The command is deliberately limited and tries hard to maintain the Maildir-integrity and to minimize chance of accidents The source-path must be a full, absolute path to the message you want to move, while the target-maildir is the path to the maildir, but without the 'cur' or 'new' part - that part will be constructed from the source message, so that message that live in 'new' will also be in 'new' in the target, and the same for 'cur'. If needed, consult the maildir(5) documentation for details about 'cur' and 'new'. As a special case, when /dev/null is specified as the target directory, the mail file will be unlinked (deleted). Note, unlike the UNIX mv command, mu mv takes precisely two parameters. It's recommended not to use wildcards on the shell, the result may be unexpected. Also note, mu mv only updates the file system; it does not update the database. To update the database, there is mu index(1) or mu add and mu remove.

OPTIONS

--flags=<flags>
    using the this option, you can change the file flags of the target file. If you change the 'N' (new) flag, this will also change the exact target directory ('new' vs 'cur'). The flags is a sequence of characters from the set D (draft), F (flagged) ,N (new), P (passed), R (replied), S (seen) and T (trashed). Note, the flags-parameter is case-sensitive.

--printtarget
    return the target path on standard output upon succesful completion of the move (with or without a succesful database update)

EXAMPLE
To move a message /home/jimbo/Maildir/scuba/cur/123123123:2,S to /home/jimbo/Maildir/archive, you can use:
   mu mv /home/jimbo/Maildir/scuba/cur/123123123:2,S /home/jimbo/Maildir/archive
This will move the message to the new path: /home/jimbo/Maildir/archive/cur/123123123:2,S. To remove a message /home/fred/Maildir/trash/cur/123123123:2,S, you could do:
   mu mv /home/fred/Maildir/trash/cur/123123123:2,S /dev/null
Obviously, you could also simply use rm in this case. To mark a message as no longer new and 'Seen', and update the database afterwards, you could do:
   mu --flags=S mv /home/roger/Maildir/inbox/new/123123123:2, /home/roger/Maildir/inbox/

LIMITATIONS
Both source-path and target-directory must be on the same disk partition, except when the target-directory is /dev/null.

RETURN VALUE
mu mv returns 0 upon success; in general, the following error codes are returned:
| code | meaning                           |
|------+-----------------------------------|
|    0 | ok                                |
|    1 | general error                     |
|    4 | database is corrupted             |
|    5 | some other database update error  |
Note that if you get a database error rather than a general error, this means that moving the file succeeded, but that the database update afterwards failed.

BUGS
Please report bugs if you find them: http://code.google.com/p/mu0/issues/list

AUTHOR
Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>

SEE ALSO
maildir(5) mu(1) mu-index(1) mu-add(1) mu-remove(1) chmod(1)