名稱
gdcloud storage cat - Output the contents of one or more URLs to stdout.
概要
gdcloud storage cat [URLS ...]
[--display-url, -d]
[--range, -r]
[--format=FORMAT]
[--log-http]
[--verbosity=VERBOSITY] [flags]
範例
The following command writes all text files in a bucket to stdout:
gdcloud storage cat s3://bucket/*.txt
The following command outputs a short header describing file.txt, along with its contents:
gdcloud storage cat -d s3://my-bucket/file.txt
The following command outputs bytes 256-939 of file.txt:
gdcloud storage cat -r 256-939 s3://my-bucket/file.txt
The following command outputs the last 5 bytes of file.txt:
gdcloud storage cat -r -5 s3://my-bucket/file.txt
選用旗標
-d, --display-url Print the header before each object.
--log-http Log all HTTP server requests and responses to stderr.
-r, --range string Output just the specified byte range of the
object. In a case where "start" = 'x', and "end" = 'y', ranges take the
form: x-y (e.g., -r 256-5939), x- (e.g., -r 256-), -y (e.g., -r -5)
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.
--verbosity string Override the default verbosity for this command. VERBOSITY must be one of:
debug, info, warning, error, critical, none. (default "warning")
GDCLOUD 廣泛標記
所有指令都可使用這些旗標:--configuration
、--format
、--help
、--project
、--quiet
。
詳情請參閱 gcloud CLI 參考資料總覽頁面。