diff --git a/docs/cli.md b/docs/cli.md index 2b15253bf4..89b274d881 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -550,6 +550,66 @@ Forcefully drop the `nextflow-io/hello` pipeline, ignoring any local changes. $ nextflow drop nextflow-io/hello -f ``` +### fs + +Perform basic filesystem operations. + +**Usage** + +```console +$ nextflow fs [subcommands] +``` + +**Description** + +The `fs` command is used to perform filesystem operations like copy, move, delete, list directory, etc. Like the `file()` method, it can work with local files, remote URLs, and remote object storage. Storage credentials can be provided through the same manner as launching a pipeline (Nextflow config, environment vars, etc). + +**Options** + +`-h, -help` +: Print the command usage. + +**Examples** + +List a directory. + +```console +$ nextflow fs list +``` + +Print the contents of a file to standard output. + +```console +$ nextflow fs cat +``` + +Copy a file or directory. + +```console +$ nextflow fs cp +``` + +Move a file or directory. + +```console +$ nextflow fs mv +``` + +Delete a file or directory. + +```console +$ nextflow fs rm +``` + +:::{versionadded} 23.10.0 +::: + +Print file or directory attributes. + +```console +$ nextflow fs stat +``` + ### help Print the top-level help or specific help for a command. diff --git a/modules/nextflow/src/main/groovy/nextflow/cli/CmdFs.groovy b/modules/nextflow/src/main/groovy/nextflow/cli/CmdFs.groovy index 10464cd533..78daaa5ea6 100644 --- a/modules/nextflow/src/main/groovy/nextflow/cli/CmdFs.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/cli/CmdFs.groovy @@ -234,7 +234,7 @@ class CmdFs extends CmdBase implements UsageAware { private void run0() { final cmd = findCmd(args[0]) if( !cmd ) { - throw new AbortOperationException("Unknown file system command: `$cmd`") + throw new AbortOperationException("Unknown fs sub-command: `$cmd`") } Path target @@ -311,7 +311,7 @@ class CmdFs extends CmdBase implements UsageAware { if( sub ) println sub.usage() else { - throw new AbortOperationException("Unknown cloud sub-command: ${args[0]}") + throw new AbortOperationException("Unknown fs sub-command: ${args[0]}") } }