File: //snap/google-cloud-cli/396/help/man/man1/gcloud_beta_cloud-shell_scp.1
.TH "GCLOUD_BETA_CLOUD\-SHELL_SCP" 1
.SH "NAME"
.HP
gcloud beta cloud\-shell scp \- copies files between Cloud Shell and the local machine
.SH "SYNOPSIS"
.HP
\f5gcloud beta cloud\-shell scp\fR (\fIcloudshell\fR|\fIlocalhost\fR):\fISRC\fR [(\fIcloudshell\fR|\fIlocalhost\fR):\fISRC\fR\ ...] (\fIcloudshell\fR|\fIlocalhost\fR):\fIDEST\fR [\fB\-\-dry\-run\fR] [\fB\-\-force\-key\-file\-overwrite\fR] [\fB\-\-recurse\fR] [\fB\-\-scp\-flag\fR=\fISCP_FLAG\fR] [\fB\-\-ssh\-key\-file\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR \fBgcloud beta cloud\-shell scp\fR copies files between your Cloud
Shell instance and your local machine using the scp command.
.SH "EXAMPLES"
To denote a file in Cloud Shell, prefix the file name with the string
"cloudshell:" (e.g. \fIcloudshell:\fR~/\fIFILE\fR). To denote a local file,
prefix the file name with the string "localhost:" (e.g.
\fIlocalhost:\fR~/\fIFILE\fR). For example, to copy a remote directory to your
local machine, run:
.RS 2m
$ gcloud beta cloud\-shell scp cloudshell:~/REMOTE\-DIR \e
localhost:~/LOCAL\-DIR
.RE
In the above example, \fB\fI~/REMOTE\-DIR\fR\fR from your Cloud Shell instance
is copied into the ~/\fILOCAL\-DIR\fR directory.
Conversely, files from your local computer can be copied into Cloud Shell:
.RS 2m
$ gcloud beta cloud\-shell scp localhost:~/LOCAL\-FILE\-1 \e
localhost:~/LOCAL\-FILE\-2 cloudshell:~/REMOTE\-DIR
.RE
Under the covers, \fBscp(1)\fR or pscp (on Windows) is used to facilitate the
transfer.
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
(\fIcloudshell\fR|\fIlocalhost\fR):\fISRC\fR [(\fIcloudshell\fR|\fIlocalhost\fR):\fISRC\fR ...]
Specifies the files to copy.
.TP 2m
(\fIcloudshell\fR|\fIlocalhost\fR):\fIDEST\fR
Specifies a destination for the source files.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-dry\-run\fR
If provided, prints the command that would be run to standard out instead of
executing it.
.TP 2m
\fB\-\-force\-key\-file\-overwrite\fR
If enabled gcloud will regenerate and overwrite the files associated with a
broken SSH key without asking for confirmation in both interactive and
non\-interactive environment.
If disabled gcloud will not attempt to regenerate the files associated with a
broken SSH key and fail in both interactive and non\-interactive environment.
.TP 2m
\fB\-\-recurse\fR
Upload directories recursively.
.TP 2m
\fB\-\-scp\-flag\fR=\fISCP_FLAG\fR
Extra flag to be sent to scp. This flag may be repeated.
.TP 2m
\fB\-\-ssh\-key\-file\fR
The path to the SSH key file. By default, this is
\fB~/.ssh/google_compute_engine\fR.
.RE
.sp
.SH "GCLOUD WIDE FLAGS"
These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.
Run \fB$ gcloud help\fR for details.
.SH "NOTES"
This command is currently in beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud cloud\-shell scp
.RE
.RS 2m
$ gcloud alpha cloud\-shell scp
.RE