如何在Google云端存储中下载多个文件 [英] How to download multiple files in Google Cloud Storage

查看:283
本文介绍了如何在Google云端存储中下载多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

场景:项目组成员可以访问多个文件夹和存储在存储桶中的许多文件。而不是一次下载一个文件(这非常慢并且非常耗时),是否有办法下载整个文件夹?或者一次至少有多个文件?这是可能的,而不必使用其中一个命令控制台?一些团队成员并不懂技术,需要尽可能简单地访问这些文件。感谢您的帮助!

解决方案

我推荐他们使用 gsutil 。 GCS的API一次只处理一个对象。不过,它的命令行实用程序 gsutil 并不乐意同时下载一堆对象。使用gsutil下载整个GCS文件夹非常简单:

  $> gsutil cp -r gs:// my-bucket / remoteDirectory localDirectory 


Scenario: there are multiple folders and many files stored in storage bucket that is accessible by project team members. Instead of downloading individual files one at a time (which is very slow and time consuming), is there a way to download entire folders? Or at least multiple files at once? Is this possible without having to use one of the command consoles? Some of the team members are not tech savvy and need to access these files as simple as possible. Thank you for any help!

解决方案

I recommend they use gsutil. GCS's API deals with only one object at a time. However, its command-line utility, gsutil, is more than happy to download a bunch of objects in parallel, though. Downloading an entire GCS "folder" with gsutil is pretty simple:

$> gsutil cp -r gs://my-bucket/remoteDirectory localDirectory

这篇关于如何在Google云端存储中下载多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆