File: //snap/google-cloud-cli/394/help/man/man1/gcloud_storage_cat.1
.TH "GCLOUD_STORAGE_CAT" 1
.SH "NAME"
.HP
gcloud storage cat \- outputs the contents of one or more URLs to stdout
.SH "SYNOPSIS"
.HP
\f5gcloud storage cat\fR \fIURL\fR [\fIURL\fR\ ...] [\fB\-\-additional\-headers\fR=\fIHEADER\fR=\fIVALUE\fR] [\fB\-\-display\-url\fR,\ \fB\-d\fR] [\fB\-\-range\fR=\fIRANGE\fR,\ \fB\-r\fR\ \fIRANGE\fR] [\fB\-\-decryption\-keys\fR=[\fIDECRYPTION_KEY\fR,...]] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
The cat command outputs the contents of one or more URLs to stdout. While the
cat command does not compute a checksum, it is otherwise equivalent to doing:
.RS 2m
$ gcloud storage cp url... \-
.RE
(The final '\-' causes gcloud to stream the output to stdout.)
.SH "EXAMPLES"
The following command writes all text files in a bucket to stdout:
.RS 2m
$ gcloud storage cat gs://bucket/*.txt
.RE
The following command outputs a short header describing file.txt, along with its
contents:
.RS 2m
$ gcloud storage cat \-d gs://my\-bucket/file.txt
.RE
The following command outputs bytes 256\-939 of file.txt:
.RS 2m
$ gcloud storage cat \-r 256\-939 gs://my\-bucket/file.txt
.RE
The following command outputs the last 5 bytes of file.txt:
.RS 2m
$ gcloud storage cat \-r \-5 gs://my\-bucket/file.txt
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIURL\fR [\fIURL\fR ...]
The url of objects to list.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-additional\-headers\fR=\fIHEADER\fR=\fIVALUE\fR
Includes arbitrary headers in storage API calls. Accepts a comma separated list
of key=value pairs, e.g. \f5header1=value1,header2=value2\fR. Overrides the
default \fBstorage/additional_headers\fR property value for this command
invocation.
.TP 2m
\fB\-\-display\-url\fR, \fB\-d\fR
Prints the header before each object.
.TP 2m
\fB\-\-range\fR=\fIRANGE\fR, \fB\-r\fR \fIRANGE\fR
Causes gcloud storage to output just the specified byte range of the object. In
a case where "start" = 'x', and "end" = 'y', ranges take the form: \f5x\-y\fR
(e.g., \f5\-r 256\-5939\fR), \f5x\-\fR (e.g., \f5\-r 256\-\fR), \f5\-y\fR (e.g.,
\f5\-r \-5\fR)
When offsets start at 0, x\-y means to return bytes x through y (inclusive), x\-
means to return bytes x through the end of the object, and \-y changes the role
of y. If \-y is present, then it returns the last y bytes of the object.
If the bytes are out of range of the object, then nothing is printed
.RE
.sp
.SH "ENCRYPTION FLAGS"
.RS 2m
.TP 2m
\fB\-\-decryption\-keys\fR=[\fIDECRYPTION_KEY\fR,...]
A comma\-separated list of customer\-supplied encryption keys (RFC 4648 section
4 base64\-encoded AES256 strings) that will be used to decrypt Cloud Storage
objects. Data encrypted with a customer\-managed encryption key (CMEK) is
decrypted automatically, so CMEKs do not need to be listed here.
.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 variant is also available:
.RS 2m
$ gcloud alpha storage cat
.RE