ossutil enables you to efficiently manage objects in Object Storage Service (OSS). For example, you can use ossutil to upload large objects, download objects, and delete objects whose names contain a specific prefix. ossutil supports Windows, Linux, and macOS operating systems. You can download and install a suitable ossutil version to meet your business requirements.
Version
Current version: 2.1.1
Download ossutil
Download URL | SHA256 checksum |
af77d281229d51df7fd15d645a842dec97f6be4eeb245db20f90f197ac1cdfb3 | |
60f3a808cbbdfd4b5269b8f967c6a66f564c9dacff52d93a5d21a588976ab5a2 | |
0861cca6454307f884a4f54d73c8af42f8abe4fea4cb189b1481f37ca6aee3a8 | |
a22a50d528b54c806aeadbc65289ac03769b64265d2121e9221df7678bdb4f63 | |
10a6b6189542c21577513e18e6d4804bf80d99e88a6264801bdb7b1ec4419725 | |
ee699ca71a98ca9d42ad345058376f10f4e917f452b454a3e26b59911c7b08fc | |
f2d8cf95e9718d894d3f207b05b0d4649636c862cf25a05e4e38f4291732c8e9 | |
8797230d56ade91e7002fca3bdd72ab6a5e0d215867f0998241d91611afce120 | |
00b46eee2e9899a1cd6b26a3e6b8162f0f4dd488b4ae0afe2f84314b1f530701 |
Install ossutil
Linux
Install ossutil.
Download the ossutil installation package.
curl -o ossutil-2.1.1-linux-amd64.zip https://gosspublic.alicdn.com/ossutil/v2/2.1.1/ossutil-2.1.1-linux-amd64.zip
NoteIn this example, ossutil is downloaded for a 64-bit Linux x86 system. For download URLs of other systems, see Download ossutil.
Enter the directory in which the ossutil package is stored and run the following unzip command:
unzip ossutil-2.1.1-linux-amd64.zip
Go to the ossutil-2.1.0-linux-amd64 directory.
cd ossutil-2.1.1-linux-amd64
Run the following command in the current directory:
chmod 755 ossutil
Run the following command for global invocation of ossutil.
sudo mv ossutil /usr/local/bin/ && sudo ln -s /usr/local/bin/ossutil /usr/bin/ossutil
Check whether ossutil is installed.
ossutil
If ossutil help information is returned, ossutil has been installed.
Configure ossutil.
Run the following command to start the configuration process:
ossutil config
Configure the path of the configuration file as prompted. You can press the Enter key to use the default path of the configuration file.
Please enter the config file name,the file name can include path(default /root/.ossutilconfig, carriage return will use the default file. If you specified this option to other file, you should specify --config-file option to the file when you use other commands):
By default, ossutil uses /root/.ossutilconfig as the configuration file. If you specify a different configuration file, you must add the -c option to specify the configuration file every time you run a command. For example, if you save the configuration file as /home/config, add the -c option in the following format when you run the ls command:
ossutil ls oss://examplebucket -c /home/config
Specify the AccessKey ID, AccessKey secret, and region ID based on the on-screen instructions.
Enter the AccessKey ID you created.
Please enter Access Key ID [****************id]:LTAI****************
Enter the AccessKey secret you created.
Please enter Access Key Secret [****************sk]:R6vg*********************
Enter the ID of the region in which your data is stored on OSS. The default region ID is cn-hangzhou.
Please enter Region [cn-hangzhou]:cn-hangzhou
Specify the endpoint for the region in which the bucket is located. You can press Enter to skip this step.
After you specify the region ID in the previous step, the public endpoint of the region is used by default. For example, if you set
region-id
tocn-hangzhou
, the default public endpoint ishttps://oss-cn-hangzhou.aliyuncs.com
.If you want to use a different endpoint, enter the endpoint. For example, if you want to access OSS from other Alibaba Cloud services that are deployed in the same region as OSS, use the internal endpoint such as
https://oss-cn-hangzhou-internal.aliyuncs.com
Please enter Endpoint (optional, use public endpoint by default) [None]: https://oss-cn-hangzhou-internal.aliyuncs.com
The following table describes the parameters.
Parameter
Required
Description
accessKeyID
Yes
Enter the AccessKey pair of your account. For more information about how to obtain an AccessKey pair, see Create an AccessKey pair.
accessKeySecret
Yes
Region
Yes
Enter the ID of the region where your bucket is located. In this example, the region is China (Hangzhou), and the region ID is cn-hangzhou. For more information about region IDs, see Regions and endpoints.
endpoint
No
Enter the endpoint of the region where your bucket is located. In this example, the bucket is located in China (Hangzhou), and the public endpoint is
https://oss-cn-hangzhou.aliyuncs.com
.If you want to access OSS from other Alibaba Cloud services that are deployed in the same region as OSS, use the internal endpoint
https://oss-cn-hangzhou-internal.aliyuncs.com
.For more information about endpoints of different regions, see Regions and endpoints.
Windows
Install ossutil.
Download the ossutil package for your system architecture and bit version:
x86_32 architecture: Windows x86 32bit.
x86_64 architecture: Windows x86 64bit.
Windows 7, Windows 8, and Windows Server 2008R2: Windows 7, Windows 8, Windows Server 2008R2.
Extract the file from the ossutil package to a directory and enter the directory, as shown in the following figure.
Configure an environment variable for the path of the file.
Click the address bar to copy the path of the current folder.
Open the Environment Variables dialog box, find and double-click the Path variable in the System Variables section, click the New button, and then paste the path of the ossutil folder into the new entry box.
Open the command line and run the
ossutil
command. If ossutil help information is returned, ossutil has been installed.ossutil
Configure ossutil.
Run the following command to specify parameters:
ossutil config
Follow the on-screen instructions to configure the path of the configuration file. You can press the Enter key to use the default path of the configuration file.
Please enter the config file name,the file name can include path(default "C:\Users\issuser\.ossutilconfig", carriage return will use the default file. If you specified this option to other file, you should specify --config-file option to the file when you use other commands):
By default, ossutil saves the configuration file as C:\Users\issuser\.ossutilconfig. If you specify the path of the configuration file, add the -c option to specify the configuration file each time you run a command in ossutil. For example, if you save the configuration file as c:\ossutil\config, add the -c option in the following format when you run the ls command:
ossutil ls oss://examplebucket -c c:\ossutil\config
Specify the AccessKey ID, AccessKey secret, and region ID based on the on-screen instructions.
Enter the AccessKey ID you created.
Please enter Access Key ID [****************id]:LTAI****************
Enter the AccessKey secret you created.
Please enter Access Key Secret [****************sk]:R6vg*********************
Enter the ID of the region in which your data is stored on OSS. The default region ID is cn-hangzhou.
Please enter Region [cn-hangzhou]:cn-hangzhou
Specify an endpoint for the region. You can press Enter to skip this step.
After you specify the region ID in the previous step, the public endpoint of the region is used by default. For example, if you set
region-id
tocn-hangzhou
, the default public endpoint ishttps://oss-cn-hangzhou.aliyuncs.com
.If you want to use a different endpoint, enter the endpoint. For example, if you want to access OSS from other Alibaba Cloud services that are deployed in the same region as OSS, use the internal endpoint such as
https://oss-cn-hangzhou-internal.aliyuncs.com
Please enter Endpoint (optional, use public endpoint by default) [None]: https://oss-cn-hangzhou-internal.aliyuncs.com
The following table describes the parameters.
Parameter
Required
Description
accessKeyID
Yes
Enter the AccessKey pair of your account. For more information about how to obtain an AccessKey pair, see Create an AccessKey pair.
accessKeySecret
Yes
Region
Yes
Enter the ID of the region where your bucket is located. In this example, the region is China (Hangzhou), and the region ID is cn-hangzhou. For more information about region IDs, see Regions and endpoints.
endpoint
No
Enter the endpoint of the region where your bucket is located. In this example, the bucket is located in China (Hangzhou), and the public endpoint is
https://oss-cn-hangzhou.aliyuncs.com
.If you want to access OSS from other Alibaba Cloud services that are deployed in the same region as OSS, use the internal endpoint
https://oss-cn-hangzhou-internal.aliyuncs.com
.For more information about endpoints of different regions, see Regions and endpoints.
macOS
Install ossutil.
Download the ossutil installation package.
curl -o ossutil-2.1.1-mac-arm64.zip https://gosspublic.alicdn.com/ossutil/v2/2.1.1/ossutil-2.1.1-mac-arm64.zip
NoteIn this example, ossutil for 64-bit macOS ARM is downloaded. For download URLs of other systems, see Download ossutil.
Enter the directory in which the ossutil package is stored and run the following unzip command:
unzip ossutil-2.1.1-mac-arm64.zip
Go to the ossutil-2.1.0-mac-arm64 directory.
cd ossutil-2.1.1-mac-arm64
Run the following command in the current directory:
chmod 755 ossutil
Run the following command for global invocation of ossutil.
sudo mv ossutil /usr/local/bin/ && sudo ln -s /usr/local/bin/ossutil /usr/bin/ossutil
Check whether ossutil is installed.
ossutil
If ossutil help information is returned, ossutil has been installed.
Configure ossutil.
Run the following command to specify parameters:
ossutil config
Follow the on-screen instructions to configure the path of the configuration file. You can press the Enter key to use the default path of the configuration file.
Please enter the config file name,the file name can include path(default "/Users/user/.ossutilconfig", carriage return will use the default file. If you specified this option to other file, you should specify --config-file option to the file when you use other commands):
By default, ossutil saves the configuration file as /Users/user/.ossutilconfig. If you specify the path of the configuration file, add the -c option to specify the configuration file each time you run a command in ossutil. For example, if you save the configuration file as /home/config, add the -c option in the following format when you run the ls command:
ossutil ls oss://examplebucket -c /home/config
Specify the AccessKey ID, AccessKey secret, and region ID based on the on-screen instructions.
Enter the AccessKey ID you created.
Please enter Access Key ID [****************id]:LTAI****************
Enter the AccessKey secret you created.
Please enter Access Key Secret [****************sk]:R6vg*********************
Enter the ID of the region in which your data is stored on OSS. The default region ID is cn-hangzhou.
Please enter Region [cn-hangzhou]:cn-hangzhou
Specify an endpoint for the region. You can press Enter to skip this step.
After you specify the region ID in the previous step, the public endpoint of the region is used by default. For example, if you set
region-id
tocn-hangzhou
, the default public endpoint ishttps://oss-cn-hangzhou.aliyuncs.com
.If you want to use a different endpoint, enter the endpoint. For example, if you want to access OSS from other Alibaba Cloud services that are deployed in the same region as OSS, use the internal endpoint such as
https://oss-cn-hangzhou-internal.aliyuncs.com
Please enter Endpoint (optional, use public endpoint by default) [None]: https://oss-cn-hangzhou-internal.aliyuncs.com
The following table describes the parameters.
Parameter
Required
Description
accessKeyID
Yes
Enter the AccessKey pair of your account. For more information about how to obtain an AccessKey pair, see Create an AccessKey pair.
accessKeySecret
Yes
Region
Yes
Enter the ID of the region where your bucket is located. In this example, the region is China (Hangzhou), and the region ID is cn-hangzhou. For more information about region IDs, see Regions and endpoints.
endpoint
No
Enter the endpoint of the region where your bucket is located. In this example, the bucket is located in China (Hangzhou), and the public endpoint is
https://oss-cn-hangzhou.aliyuncs.com
.If you want to access OSS from other Alibaba Cloud services that are deployed in the same region as OSS, use the internal endpoint
https://oss-cn-hangzhou-internal.aliyuncs.com
.For more information about endpoints of different regions, see Regions and endpoints.