update - Update to the latest gsutil release

update - Update to the latest gsutil release


gsutil update [-f] [-n] [url]


The gsutil update command downloads the latest gsutil release, checks its version, and offers to let you update to it if it differs from the version you're currently running. Note that this functionality is not available if you're using a gsutil installation from a package manager or the Cloud SDK.

Once you say "Y" to the prompt of whether to install the update, the gsutil update command locates where the running copy of gsutil is installed, unpacks the new version into an adjacent directory, moves the previous version aside, moves the new version to where the previous version was installed, and removes the moved-aside old version. Because of this, users are cautioned not to store data in the gsutil directory, since that data will be lost when you update gsutil. (Some users change directories into the gsutil directory to run the command. We advise against doing that, for this reason.) Note also that the gsutil update command will refuse to run if it finds user data in the gsutil directory.

By default gsutil update will retrieve the new code from gs://pub/gsutil.tar.gz, but you can optionally specify a URL to use instead. This is primarily used for distributing pre-release versions of the code to a small group of early test users.

Note: gsutil periodically checks whether a more recent software update is available. By default this check is performed every 30 days; you can change (or disable) this check by editing the software_update_check_period variable in the .boto config file. Note also that gsutil will only check for software updates if stdin, stdout, and stderr are all connected to a TTY, to avoid interfering with cron jobs, streaming transfers, and other cases where gsutil input or output are redirected from/to files or pipes. Software update periodic checks are also disabled by the gsutil -q option (see gsutil help options)


-f Forces the update command to offer to let you update, even if you have the most current copy already. This can be useful if you have a corrupted local copy.
-n Causes update command to run without prompting [Y/n] whether to continue if an update is available.
Esta página foi útil? Conte sua opinião sobre:

Enviar comentários sobre…

Precisa de ajuda? Acesse nossa página de suporte.