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

ossutil allows you to perform the following operations:
  • Bucket management, such as creating, listing, and deleting buckets.
  • Object management, such as uploading, downloading, listing, copying, and deleting objects.
  • Part management, such as listing and deleting parts.

Install ossutil

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

Common commands

The following table describes common ossutil commands.
Command Description
appendfromfile Uploads a local file to an appendable object in OSS.
bucket-encryption Adds, modifies, queries, or deletes encryption configurations for a bucket.
bucket-policy Adds, modifies, queries, or deletes the bucket policy 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 Obtains the storage size of a specified bucket, object, or object directory.
getallpartsize Obtains the size of each part in a bucket that has not been uploaded and the total size of all of those parts.
hash Calculates the CRC-64 or MD5 value of a local file.
help Obtains help information about a command. We recommend that you use the help command to obtain information about a specified command.
lifecycle Adds, modifies, queries, or deletes lifecycle configurations for a bucket.
listpart Lists the parts that have not been 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 directory in a bucket.
object-tagging Adds, modifies, queries, or deletes tagging configurations for an object.
probe Monitors access to OSS, and troubleshoots problems 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 Obtains 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.