You can use ossutil to quickly upload large files, download files, or delete files that have a specific prefix. ossutil runs on Windows, Linux, and macOS. Download and install the version that is suitable for your operating system.
Version upgrade
We recommend that you install and use the upgraded ossutil 2.0. For more information about the installation, see Install ossutil.
Key features of ossutil 2.0:
New command structure: Supports multi-level commands, including API-level commands such as
ossutil api put-bucket-acland high-level commands such asossutil config.Improved configuration management: Simplifies the initial configuration process. After installation, you only need to provide an AccessKey ID, an AccessKey secret, and a region ID to complete the basic configuration. You can also specify multiple configuration files using the
--profileparameter for greater flexibility.Extensive filter parameters: For batch processing commands such as
ls,cp, andrm, ossutil 2.0 supports multiple filter conditions based on path, file size, modification time, and object metadata. This feature greatly improves the precision and efficiency of operations.Flexible output formats: The new
--output-formatparameter lets you set the output format to JSON, YAML, or XML to meet different data processing requirements. The--output-queryoption is also introduced to allow you to filter the output and retrieve the required information.Enhanced security: To improve security, ossutil 2.0 supports setting sensitive parameters through environment variables. This avoids exposing keys directly in the command line and reduces the threat of information leaks. In addition, the new
--dry-runoption lets you verify the behavior of a command before you run it to ensure that the operation is correct.
Versions
Current version: 1.7.19
Previous versions: For more information about the source code and release history of ossutil versions, see GitHub.
Download links
Download link | SHA256 checksum |
f8a4a7e1df8529b06a3f3cca194a1c99163cb3b8ab3b5d64228c207c3ae63b86 | |
dcc512e4a893e16bbee63bc769339d8e56b21744fd83c8212a9d8baf28767343 | |
ffe8b479e5fd3c0e146a14cd32e8ef5736d23f6c8de157944288ee09db2d7b1d | |
f612c2a88d4d28363e254168d521fac5df632f2547ba84eaebacf6497dc04d57 | |
9cf82a53fe24d8b5cc3dfb441787e0ea19c24dd7a1246653d5f1a28b7923d6fe | |
10ece4d328c5d2440833adc5f4167168e9b2a4c5d364f673b0c45bcc4fd02ec5 | |
772469ef02b91e893f7211acf732c2c07cd93214552ed7cf84157d3d9b9fb799 | |
8e9176aedc87d230ccd97dc7236b16564f2a068609ed301acdc73dc27faf7e77 |
Download and install ossutil
Linux
Install ossutil.
sudo -v ; curl https://gosspublic.alicdn.com/ossutil/install.sh | sudo bashNoteThe installation package must be decompressed. Make sure that a decompression tool, such as unzip or 7z, is installed.
After installation, ossutil is installed in the /usr/bin/ directory.
Configure ossutil.
Enter the configuration command.
ossutil configSet the configuration file path as prompted.
Enter the configuration file name. The file name can include a path (default: /home/user/.ossutilconfig, press Enter to use the default path. If you set another path, you must add the --config-file option to specify the path when you run commands):By default, the configuration file is located in the /home/user/.ossutilconfig path. If you specify a custom path for the configuration file, you must add the -c option to specify the configuration file each time you run a command. For example, if the configuration file is saved to /home/config, the command to run ls is as follows:
ossutil ls oss://examplebucket -c /home/configSet the language for the tool when prompted. Enter
CHorEN. By default, the tool's language is the same as the language of the operating system. This configuration takes effect after the config command runs successfully.As prompted, set the language for ossutil.
Enter CH or EN. By default, ossutil uses the same language as your operating system. This configuration takes effect after the config command is successfully run.
As prompted, set the Endpoint, AccessKey ID, AccessKey Secret, and STSToken parameters. If you use temporary access credentials from Security Token Service (STS) to access OSS, you must configure the STSToken parameter. Otherwise, leave this parameter empty and press Enter.
The following table describes the parameters.
Parameter
Required
Description
endpoint
Yes
Enter the Endpoint of the region where the bucket is located. For example, this example uses the public endpoint of Singapore. Set it to
https://oss-ap-southeast-1.aliyuncs.com.If you want to access OSS from other Alibaba Cloud products in the same region as OSS, use the internal network Endpoint. Set it to
https://oss-ap-southeast-1-internal.aliyuncs.com.For more information about the Endpoints of each region, see Regions and Endpoints.
ImportantDue to a policy adjustment to improve the compliance and security of OSS, starting March 20, 2025, new OSS users cannot call data operation APIs, such as file upload and download, for buckets in the Chinese mainland region using the default public endpoint. You must access OSS using a custom domain name (CNAME). If you use the HTTPS protocol for access, such as from the console, you must also configure an SSL Certificate for the custom domain name.
accessKeyID
Yes
Enter the AccessKey of your account. For more information about how to obtain an AccessKey, see Create an AccessKey.
accessKeySecret
Yes
stsToken
No
This parameter is required only when you use temporary access credentials from STS to access OSS. Otherwise, leave this parameter empty and press Enter. For more information about how to generate an stsToken, see AssumeRole - Obtain temporary identity credentials of a role.
Verify that ossutil is installed.
ossutilIf the supported ossutil commands are displayed on the screen, ossutil is installed successfully.
Windows
Install ossutil.
Click the download link to download the Windows installation package.
Decompress the installation package and double-click the ossutil.bat file.
Configure ossutil.
Enter the configuration command.
ossutil configSet the configuration file path as prompted.
Enter the configuration file name. The file name can include a path (default: C:\\Users\user\.ossutilconfig, press Enter to use the default path. If you set another path, you must add the --config-file option to specify the path when you run commands):By default, the configuration file is located in the C:\\Users\user\.ossutilconfig path. If you specify a custom path for the configuration file, you must add the -c option to specify the configuration file each time you run a command. For example, if the configuration file is saved to c:\ossutil\config, the command to run ls is as follows:
ossutil ls oss://examplebucket -c c:\ossutil\configAs prompted, set the language for ossutil. Enter
CHorEN. By default, ossutil uses the same language as your operating system. This configuration takes effect after the config command is successfully run.As prompted, set the Endpoint, AccessKey ID, AccessKey Secret, and STSToken parameters. If you use temporary access credentials from STS to access OSS, you must configure the STSToken parameter. Otherwise, leave this parameter empty and press Enter.
The following table describes the parameters.
Parameter
Required
Description
endpoint
Yes
Enter the Endpoint of the region where the bucket is located. For example, to use the public endpoint of the China (Hangzhou) region, set this parameter to
https://oss-cn-hangzhou.aliyuncs.com.If you want to access OSS from other Alibaba Cloud products in the same region as OSS, use the internal network Endpoint. Set it to
https://oss-cn-hangzhou-internal.aliyuncs.com.For more information about the Endpoints of each region, see Regions and Endpoints.
accessKeyID
Yes
Enter the AccessKey of your account. For more information about how to obtain an AccessKey, see Create an AccessKey.
accessKeySecret
Yes
stsToken
No
This parameter is required only when you use temporary access credentials from STS to access OSS. Otherwise, leave this parameter empty and press Enter. For more information about how to generate an stsToken, see AssumeRole - Obtain temporary identity credentials of a role.
You can verify that ossutil is installed.
ossutilIf a list of all supported ossutil commands is displayed, the installation is successful.
macOS
Install ossutil.
sudo -v ; curl https://gosspublic.alicdn.com/ossutil/install.sh | sudo bashNoteBy default, ossutil is installed in the /usr/local/bin directory.
Configure ossutil.
Enter the configuration command.
ossutil configSet the configuration file path as prompted.
Enter the configuration file name. The file name can include a path (default: /Users/user/.ossutilconfig, press Enter to use the default path. If you set another path, you must add the --config-file option to specify the path when you run commands):By default, the configuration file is located in the /Users/user/.ossutilconfig path.
If you specify a custom path for the configuration file, you must add the -c option to specify the configuration file each time you run a command. For example, if the configuration file is saved to /home/config, the command to run ls is as follows:
ossutil ls oss://examplebucket -c /home/configAs prompted, set the language for ossutil. Enter
CHorEN. By default, ossutil uses the same language as your operating system. This configuration takes effect after the config command is successfully run.As prompted, set the Endpoint, AccessKey ID, AccessKey Secret, and STSToken parameters. If you use temporary access credentials from STS to access OSS, you must configure the STSToken parameter. Otherwise, leave this parameter empty and press Enter.
The following table describes the parameters.
Parameter
Required
Description
endpoint
Yes
Enter the Endpoint of the region where the bucket is located. For example, this example uses the public endpoint of Singapore. Set it to
https://oss-ap-southeast-1.aliyuncs.com.If you want to access OSS from other Alibaba Cloud products in the same region as OSS, use the internal network Endpoint. Set it to
https://oss-ap-southeast-1-internal.aliyuncs.com.For more information about the Endpoints of each region, see Regions and Endpoints.
ImportantDue to a policy adjustment to improve the compliance and security of OSS, starting March 20, 2025, new OSS users cannot call data operation APIs, such as file upload and download, for buckets in the Chinese mainland region using the default public endpoint. You must access OSS using a custom domain name (CNAME). If you use the HTTPS protocol for access, such as from the console, you must also configure an SSL Certificate for the custom domain name.
accessKeyID
Yes
Enter the AccessKey of your account. For more information about how to obtain an AccessKey, see Create an AccessKey.
accessKeySecret
Yes
stsToken
No
This parameter is required only when you use temporary access credentials from STS to access OSS. Otherwise, leave this parameter empty and press Enter. For more information about how to generate an stsToken, see AssumeRole - Obtain temporary identity credentials of a role.
Verify that ossutil is installed.
ossutilIf the supported ossutil commands are displayed on the screen, ossutil is installed successfully.
References
After you install ossutil, you can perform operations such as uploading, downloading, copying, and deleting files. For more information, see cp (upload files), cp (download files), cp (copy files), and rm (delete).


