使用CLI在Azure中上载文件 [英] Uploading File in Azure using CLI

查看:67
本文介绍了使用CLI在Azure中上载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试练习以下任务:

I am trying to practice on the following tasks:

  1. 创建存储帐户:az存储帐户create --name heyatafroz25 --resource-group user-fottsascvuzj

  1. Create Storage Account: az storage account create --name heyatafroz25 --resource-group user-fottsascvuzj

获取存储帐户密钥:az存储帐户密钥列表-g user-fottsascvuzj -n heyatafroz25

Get Storage Account Key: az storage account keys list -g user-fottsascvuzj -n heyatafroz25

创建共享帐户:az存储共享create --account-name heyatafroz25 --name key1az存储共享create --account-name heyatafroz25 --name key2

Create Share Account: az storage share create --account-name heyatafroz25 --name key1 az storage share create --account-name heyatafroz25 --name key2

创建存储目录:az存储目录create --account-name heyatafroz25 --name heyatdir1 --share-name key1az存储目录create --account-name heyatafroz25 --name heyatdir2 --share-name key2

Create Storage Directory: az storage directory create --account-name heyatafroz25 --name heyatdir1 --share-name key1 az storage directory create --account-name heyatafroz25 --name heyatdir2 --share-name key2

上传文件

系统要求我创建一个使用touch命令创建的index.php文件.

I was asked to create a index.php file which i created using the touch command.

我不确定要为路径和来源考虑哪些细节.对于路径,我使用了当前的工作目录

Post that I am not sure what details to be considered for path and source. For path i took the present working directory

az存储文件上传--account-name heyatafroz25 --account-key N + PKe3ihto + G0h9CvVRV/bJ5KeEFF6RFB0aKf2qcfcyJA1uOyCBUO06Tlh9KHUzhA + PyugmDLwlrceXW5V31Xw/=-book -name/php.来源/home/scrapbook/tutorial/index.php

az storage file upload --account-name heyatafroz25 --account-key N+PKe3ihto+G0h9CvVRV/bJ5KeEFF6RFB0aKf2qcfcyJA1uOyCBUO06Tlh9KHUzhA+PyugmDLwlrceXW5V31Xw== --path /home/scrapbook/tutorial/index.php --share-name key1 --source /home/scrapbook/tutorial/index.php

请在第5条命令中提出更正建议.

Please suggest on the corrections in the 5th command.

谢谢.

推荐答案

尝试运行以下命令:

az storage file upload --account-name mystorageaccount --account-key NT9ewNtqU1CB+Z7Lzm5f3UOvWbywC8b0Bk8TWnp06zwzDCoe3vGV2u/wQmupT04//pqpIyOwsn/Q9rtSDBdVdg== --share-name myfileshare --path "myDirectory/index.php" --source "/home/scrapbook/tutorial/php-docs-hello-world/index.php"

这篇关于使用CLI在Azure中上载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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