使用 Cloud Shell 管理文件
本页面介绍如何使用 Cloud Shell 上传和下载文件和文件夹。
上传和下载文件和文件夹
使用 Cloud Shell 可以轻松上传和下载文件和文件夹。如需传输文件,请使用以下方法之一:
从 Cloud Shell 三点状更多菜单中,选择上传或下载,以将您的文件或文件夹移入/移出 Cloud Shell。文件和文件夹只能上传到主目录或从中下载。

使用 cloudshell
命令下载文件:
cloudshell download test1.md test2.md
在本地终端上使用 gcloud cloud-shell scp
命令可在 Cloud Shell 和工作站之间传输文件。例如,要将文件“data.txt”从 Cloud Shell 移动到本地计算机,请执行以下命令:
gcloud cloud-shell scp cloudshell:~/data.txt localhost:~data.txt
在 Cloud Shell Editor Explorer 中,右键点击目录或文件,然后点击复制下载链接、下载文件或上传文件。

或者,您也可以导航到文件> 下载/上传文件。
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-02-17 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"很难理解"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"信息或代码不正确"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"没有我需要的信息/示例"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]