Hi All

In our last article, we have seen how to Create Object Storage Service (OSS) bucket and Create a RAM user in Alibaba Cloud. & How to Copy files to Alibaba Cloud Object Storage Service  Now we will see how to download files from  Cloud Object Storage Service (OSS) to Local system.

OSS should be already activated and RAM user should be created and Access Key and Secret Key should be required. If you not yet created, Kindly go through our previous article how to Create Object Storage Service (OSS) bucket and Create a RAM user in Alibaba Cloud.


Ossutil allows us to manage OSS data easily through command lines and easy to manage or use through commands for bucket and object management.

Download ossutil installation file.

wget http://gosspublic.alicdn.com/ossutil/1.6.1/ossutil64

Change the permission of the file

chmod 755 ossutil64

[root@techrunnr1 ~]# wget http://gosspublic.alicdn.com/ossutil/1.6.1/ossutil64
--2019-07-06 08:06:24--  http://gosspublic.alicdn.com/ossutil/1.6.1/ossutil64
Resolving gosspublic.alicdn.com (gosspublic.alicdn.com)...,
Connecting to gosspublic.alicdn.com (gosspublic.alicdn.com)||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9641827 (9.2M) [application/octet-stream]
Saving to: ‘ossutil64’

100%[=====================================================================================================================================================================>] 96,41,827   58.1MB/s   in 0.2s   

2019-07-06 08:06:24 (58.1 MB/s) - ‘ossutil64’ saved [9641827/9641827]

[root@techrunnr1 ~]# chmod 755 ossutil64

Configure ossutil64

[root@techrunnr1 ~]# ./ossutil64 config
The command creates a configuration file and stores credentials.

Please enter the config file path(default /root/.ossutilconfig, carriage return will use the default path. If you specified this option to other path, you should specify --config-file option to the path when you use other commands):
No config file entered, will use the default config file /root/.ossutilconfig

For the following settings, carriage return means skip the configuration. Please try "help config" to see the meaning of the settings
Please enter language(CH/EN, default is:EN, the configuration will go into effect after the command successfully executed):EN
Please enter accessKeySecret:**********************
Please enter stsToken:
Please enter endpoint:https://oss-me-east-1.aliyuncs.com
Please enter accessKeyID:**********
[root@techrunnr1 ~]# 

endpoint: Endpoint of the region where the bucket belongs to. For more information, see Regions and endpoints.

accessKeyID: You can refer to our previous article.

accessKeySecret: You can refer to our previous article.

stsToken: This option is required only if we are using temporary STS token to access the OSS bucket.Otherwise, we can leave it blank.

Now configuring ossutil has been done.Let’s list the OSS bucket through ossutil command.

./ossutil64 ls

[root@techrunnr1 ~]# ./ossutil64 ls
CreationTime                                 Region    StorageClass    BucketName
2019-05-06 06:14:36 +0000 UTC         oss-me-east-1        Standard    oss://sample-bucket1
Bucket Number is: 1

0.071467(s) elapsed
[root@techrunnr1 ~]# 


In web console,lets see


Now let’s see how to download one file from  OSS bucket to local directory through command line using ossutil.

/root/ossutil64 cp  oss://sample-bucket1/testuploadfile/file1.txt  testfolder/



How to copy a folder from OSS bucket to local directory through command Line using ossutil

/root/ossutil64 cp -r  oss://sample-bucket1/samplefolder testfolder/


For help we can use.
/root/ossutil64 help

There are lot of options in ossutil,we will see the other commonly used option later.

© 2020, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points


Leave a Reply

Keep ahead of COVID-19

Follow the below safety measures as precautionary steps to avoid COVID-19 1. Use face mask in public Places 2. Use Hand sanitizers 3. Maintain Social Distancing 4. Avoid going to crowded places 5. Avoid touching eyes, nose and mouth