onyo mv

Move SOURCEs into the DEST directory, or rename SOURCE to DEST.

If DEST is an Asset File, it will be converted into an Asset Directory and then the SOURCEs will be moved into it.

Assets cannot be renamed using onyo mv. Their names are generated from keys in their contents. To rename a file, use onyo set or onyo edit.

usage: onyo mv [-h] [-m MESSAGE] [--no-auto-message] SOURCE [SOURCE ...] DEST

Positional Arguments

SOURCE

Assets and/or directories to move into DEST.

DEST

Destination to move SOURCEs into.

Named Arguments

-m, --message

Append MESSAGE to the commit message. If multiple --message options are given, their values are concatenated as separate paragraphs.

--no-auto-message

Do not auto-generate the commit message subject. If no MESSAGE is given, the subject line will be [Empty subject]. This does not disable the inventory operations record at the end of a commit message. The default is configured via ‘onyo.commit.auto-message’.

Default: False

Examples

Assign an asset:

$ onyo mv shelf/laptop_lenovo_T490s.abc123 accounting/Bingo\ Bob/

Retire an asset:

$ onyo mv accounting/Bingo\ Bob/laptop_lenovo_T490s.abc123 retired/

Transfer a user to another department:

$ onyo mv accounting/Bingo\ Bob/ marketing/

Rename a department:

$ onyo mv --message "Creation is now Ideation" creation/ ideation/