Beta

Read/write files on an agent runtime

Usage: mf files [command]

Options

OptionsPurpose
-h, --helpdisplay help for command

Subcommands

CommandPurpose
mf files rootsList available file roots for an agent
mf files listList directory entries on an agent
mf files statShow file metadata
mf files readRead file contents (to stdout or —output)
mf files writeWrite file contents from —content or —file
mf files uploadUpload a local file to an agent (remotePath defaults to the file name)
mf files downloadDownload a file from an agent (localPath defaults to the file name, - for stdout)
mf files mkdirCreate a directory on an agent
mf files mvMove or rename a path on an agent
mf files rmRemove a file or directory on an agent

mf files roots

List available file roots for an agent

Usage: mf files roots [options] [agentId]

Arguments

ArgumentPurpose
[agentId]

Options

OptionsPurpose
--jsonemit raw JSON
-h, --helpdisplay help for command

mf files list

List directory entries on an agent

Usage: mf files list [options] [agentIdOrPath] [path]

Aliases: ls

Arguments

ArgumentPurpose
[agentIdOrPath]
[path]

Options

OptionsPurpose
--root <rootId>root id (default: workspace)
--jsonemit raw JSON
-h, --helpdisplay help for command

mf files stat

Show file metadata

Usage: mf files stat [options] [agentIdOrPath] [path]

Arguments

ArgumentPurpose
[agentIdOrPath]
[path]

Options

OptionsPurpose
--root <rootId>root id
--jsonemit raw JSON (default)
-h, --helpdisplay help for command

mf files read

Read file contents (to stdout or —output)

Usage: mf files read [options] [agentIdOrPath] [path]

Arguments

ArgumentPurpose
[agentIdOrPath]
[path]

Options

OptionsPurpose
--root <rootId>root id
--output <localPath>write to this local file instead of stdout
-h, --helpdisplay help for command

mf files write

Write file contents from —content or —file

Usage: mf files write [options] [agentIdOrPath] [path]

Arguments

ArgumentPurpose
[agentIdOrPath]
[path]

Options

OptionsPurpose
--content <data>inline content (string)
--file <localPath>read content from a local file
--root <rootId>root id
--jsonoutput the result as JSON
-h, --helpdisplay help for command

mf files upload

Upload a local file to an agent (remotePath defaults to the file name)

Usage: mf files upload [options] <localPath> [remotePath]

Arguments

ArgumentPurpose
<localPath>
[remotePath]

Options

OptionsPurpose
--root <rootId>root id (default: workspace)
--jsonoutput the result as JSON
-h, --helpdisplay help for command

mf files download

Download a file from an agent (localPath defaults to the file name, - for stdout)

Usage: mf files download [options] <remotePath> [localPath]

Arguments

ArgumentPurpose
<remotePath>
[localPath]

Options

OptionsPurpose
--root <rootId>root id (default: workspace)
--jsonoutput the result as JSON
-h, --helpdisplay help for command

mf files mkdir

Create a directory on an agent

Usage: mf files mkdir [options] [agentIdOrPath] [path]

Arguments

ArgumentPurpose
[agentIdOrPath]
[path]

Options

OptionsPurpose
--root <rootId>root id
--jsonoutput the result as JSON
-h, --helpdisplay help for command

mf files mv

Move or rename a path on an agent

Usage: mf files mv [options] [agentIdOrFrom] [from] [to]

Arguments

ArgumentPurpose
[agentIdOrFrom]
[from]
[to]

Options

OptionsPurpose
--root <rootId>root id
--jsonoutput the result as JSON
-h, --helpdisplay help for command

mf files rm

Remove a file or directory on an agent

Usage: mf files rm [options] [agentIdOrPath] [path]

Arguments

ArgumentPurpose
[agentIdOrPath]
[path]

Options

OptionsPurpose
--root <rootId>root id
--recursiveremove directories recursively
-y, --yesconfirm irreversible deletion
--jsonoutput the result as JSON
-h, --helpdisplay help for command
Was this page helpful?