diff --git a/core/commands/files.go b/core/commands/files.go index d173ec53731..132598428bb 100644 --- a/core/commands/files.go +++ b/core/commands/files.go @@ -321,11 +321,27 @@ func walkBlock(ctx context.Context, dagserv ipld.DAGService, nd ipld.Node) (bool var filesCpCmd = &cmds.Command{ Helptext: cmds.HelpText{ - Tagline: "Copy files into mfs.", + Tagline: "Copy any IPFS files and directories into MFS (or copy within MFS).", + ShortDescription: ` +"ipfs files cp" can be used to copy any IPFS file or directory (usually in the +form /ipfs/, but also any resolvable path), into the Mutable File System +(MFS). + +It can also be used to copy files within MFS, but in the case when an +IPFS-path matches an existing MFS path, the IPFS path wins. + +In order to add content to MFS from disk, you can use "ipfs add" to obtain the +IPFS Content Identifier and then "ipfs files cp" to copy it into MFS: + +$ ipfs add --quieter --pin=false +# ... +# ... outputs the root CID at the end +$ ipfs cp /ipfs/ /your/desired/mfs/path +`, }, Arguments: []cmds.Argument{ - cmds.StringArg("source", true, false, "Source object to copy."), - cmds.StringArg("dest", true, false, "Destination to copy object to."), + cmds.StringArg("source", true, false, "Source IPFS or MFS path to copy."), + cmds.StringArg("dest", true, false, "Destination within MFS."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { nd, err := cmdenv.GetNode(env)