将文件和文件夹从Google存储桶下载到本地文件夹 [英] Download files and folders from Google Storage bucket to a local folder
本文介绍了将文件和文件夹从Google存储桶下载到本地文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从Google Cloud Storage下载所有文件的最佳方法是什么?
What's the best way to download all files from Google Cloud Storage?
推荐答案
Take a look of the gsutil tool. You can use the cp command with the -R
(recursive) and -m
(multithreading) option.
gsutil -m cp -R gs://<bucket_name> .
如果要使用公共存储桶尝试,请尝试
And if you want to try it with a public bucket try
gsutil -m cp -R gs://uspto-pair .
由多线程授予的加速速度可能非常重要:
The speedup granted by multithreading can be quite significant:
$ time gsutil cp -R gs://uspto-pair/docs/2010-08-28 .
...
real 0m12.534s
vs
$ time gsutil -m cp -R gs://uspto-pair/docs/2010-08-28 .
...
real 0m3.345s
这篇关于将文件和文件夹从Google存储桶下载到本地文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文