TensorFlow For Dummies
Book image
Explore Book Buy On Amazon
The cat command in the gsutil utility directs an object's text to standard output. For example, the following command prints the text contained in gs://mybucket/a.txt:
gsutil cat gs://mybucket/a.txt
Despite its name, you can’t concatenate objects with cat, but you can concatenate objects with compose. That is, the following command concatenates the content of a.txt and b.txt in gs://mybucket and stores the combined result to c.txt:
gsutil compose gs://mybucket/a.txt gs://mybucket/b.txt gs://mybucket/c.txt
When you use compose, keep three points in mind:
  • A project can perform at most 200 compose operations per second.
  • A compose operation can combine a maximum of 32 entities.
  • A given object can be appended to at most 1,023 times.

compose is particularly helpful if you have to upload very large files to Cloud Storage. Rather than upload an entire file from one computer, you can upload portions of the file from separate computers and use compose to combine the portions.

About This Article

This article is from the book:

About the book author:

Matthew Scarpino has been a programmer and engineer for more than 20 years. He has worked extensively with machine learning applications, especially those involving financial analysis, cognitive modeling, and image recognition. Matthew is a Google Certified Data Engineer and blogs about TensorFlow at tfblog.com.

This article can be found in the category: