将文件和文件夹从Google存储桶下载到本地文件夹

编程入门 行业动态 更新时间:2024-10-10 04:22:17
本文介绍了将文件和文件夹从Google存储桶下载到本地文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

从Google Cloud Storage下载所有文件的最佳方法是什么?

What's the best way to download all files from Google Cloud Storage?

推荐答案

看看 gsutil工具.可以将cp命令与-R(递归)和-m(多线程)选项一起使用.

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存储桶下载到本地文件夹

本文发布于:2023-11-24 14:02:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1625506.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   文件   Google

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!