Advanced gsutil

Previously, we have seen some simple basic commands that we can import using gsutil. But with this tool we can do something else:

  • gsutil supports wildcards (and ?) and limits a wildcard to files. To include folders in the wildcard target double the sign: gsutil ll gs:///**.txt will list all the text files in subdirectories.

  • gsutil requires use of UTF-8 character encoding. For Windows: to use Unicode characters you need to run this command in the command shell before the first time you use gsutil in that shell: chcp 65001.

  • The .boto file in your local machine user path is the configuration file for the gsutil CLI. You can edit it directly or via the gsutilconfig command. Some interesting parameters in the .boto file are ...

Get Hands-On Machine Learning on Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.