ossutil allows you to use command lines to manage OSS data. ossutil provides a variety of simple commands for you to manage buckets and objects. The following operating systems support ossutil: Windows, Linux, and macOS.

ossutil allows you to perform the following operations:
  • Manage buckets, such as create, list, and delete buckets.
  • Manage objects, such as upload, download, list, copy, and delete objects.
  • Manage parts, such as list and delete parts.

Install ossutil

For more information about how to download and install ossutil, see Download and installation.

Common commands

The following table describes common commands that are supported by ossutil.
Command Description
appendfromfile Uploads a local file to an append object in OSS by using append upload.
bucket-encryption Adds, modifies, queries, or deletes encryption configurations for a bucket.
bucket-policy Adds, modifies, queries, or deletes bucket policy configurations for a bucket.
bucket-tagging Adds, modifies, queries, or deletes tagging configurations for a bucket.
bucket-versioning Adds or queries versioning configurations for a bucket.
cat Exports object content to ossutil.
config Generates a configuration file to store OSS access information.
cors Adds, modifies, queries, or deletes cross-origin resource sharing (CORS) configurations for a bucket.
cors-options Tests whether a bucket allows a specified CORS request.
cp Uploads, downloads, or copies objects.
create-symlink Creates a symbolic link.
du Queries the storage size of a specified bucket, object, or folder.
getallpartsize Queries the size of each part in a bucket that has not been uploaded and the total size of all those parts.
hash Calculates the CRC-64 or MD5 value of a local file.
help Queries help information about a command. We recommend that you use the help command to query information about a specified command.
inventory Adds, queries, lists, or deletes inventory configurations for a bucket.
lifecycle Adds, modifies, queries, or deletes lifecycle configurations for a bucket.
listpart Lists the parts that are not uploaded for an object.
logging Adds, modifies, queries, or deletes logging configurations for a bucket.
ls Lists buckets, objects, or parts.
mb Creates a bucket.
mkdir Creates a folder in a bucket.
object-tagging Adds, modifies, queries, or deletes tagging configurations for an object.
probe Monitors access to OSS. It can also be used to troubleshoot issues that are caused by network faults or incorrect parameter settings during the upload and download process.
read-symlink Reads the description of a symbolic link object.
referer Adds, modifies, queries, or deletes hotlink protection configurations for a bucket.
restore Restores an object from the frozen state to the readable state.
request-payment Configures or queries pay-by-requester configurations for a bucket.
rm Deletes buckets, objects, or parts.
set-acl Configures the ACL for a bucket or an object.
set-meta Configures the metadata for an uploaded object.
sign Generates signed URLs for third-party users to access objects in a bucket.
stat Queries the description of a specified bucket or object.
update Updates the ossutil version.
website Adds, modifies, queries, or deletes static website hosting and back-to-origin configurations for a bucket.