ossutil allows you to manage Object Storage Service (OSS) data by using command lines on Windows, Linux, and macOS operating systems.

Install ossutil

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

Configure ossutil

For more information about how to configure ossutil, see Configure ossutil.

Common commands

The following table describes common commands that are supported by ossutil.
CommandDescription
access-monitorSpecifies the access tracking state of a bucket.
appendfromfileAppends content to existing appendable objects.
bucket-cnameQueries the CNAME configurations of a bucket.
bucket-encryptionAdds encryption configurations to a bucket, or modifies, queries, and deletes the encryption configurations of a bucket.
bucket-policyAdds bucket policy configurations to a bucket, or modifies, queries, and deletes the bucket policy configurations of a bucket.
bucket-taggingAdds tagging configurations to a bucket, or modifies, queries, and deletes the tagging configurations of a bucket.
bucket-versioningAdds versioning configurations to a bucket, or queries the versioning configurations of a bucket.
catExports object content to ossutil.
configCreates a configuration file to store information that is required to access OSS.
corsAdds cross-origin resource sharing (CORS) configurations to a bucket, or modifies, queries, deletes the cross-origin resource sharing (CORS) configurations of a bucket.
cors-optionsTests whether a bucket allows a specified cross-origin request.
cpUploads, downloads, or copies objects.
create-symlinkCreates a symbolic link.
duQueries the storage usage of a specified bucket, object, or directory.
getallpartsizeQueries the size of each part of incomplete multipart upload tasks in a bucket and the total size of these parts.
hashCalculates the CRC-64 or MD5 hash of a local file.
helpQueries help information about a command. We recommend that you run the help command to query information about how to run a specified command.
inventoryAdds inventory configurations to a bucket, or queries, lists, deletes the inventory configurations of a bucket.
lifecycleAdds lifecycle configurations to a bucket, or modifies, queries, deletes the lifecycle configurations of a bucket.
listpartLists the parts generated in an incomplete multipart upload task initiated for an object.
loggingAdds logging configurations to a bucket, or modifies, queries, deletes the logging configurations of a bucket.
lrbLists the buckets that are located in a region or multiple regions.
lsLists buckets, objects, or parts.
mbCreates a bucket.
mkdirCreates a directory in a bucket.
object-taggingAdds tagging configurations to a bucket, or modifies, queries, deletes the tagging configurations of an object.
probeMonitors access to OSS. You can also run this command to troubleshoot issues that are caused by network faults or invalid parameter settings during the upload and download process.
read-symlinkReads the description of a symbolic link.
refererAdds hotlink protection configurations to a bucket, or modifies, queries, deletes the hotlink protection configurations of a bucket.
replicationManages the Cross-Region Replication (CRR) configurations of a bucket.
request-paymentConfigures the pay-by-requester mode for a bucket or queries the pay-by-requester configurations of a bucket.
resource-groupConfigures a resource group for a bucket and queries information about the resource group.
restoreRestores an object from the frozen state to the readable state.
revert-versioningRecovers a deleted object to the most recent version of the object.
rmDeletes buckets, objects, or parts.
set-aclConfigures the access control list (ACL) for a bucket or an object.
set-metaConfigures the metadata of an uploaded object.
signGenerates a signed URL for an object and shares the signed URL with third parties for downloads or previews.
statObtains the description of a specified bucket or object.
styleConfigures image styles.
syncSynchronizes local files to OSS, OSS objects to local disks, or objects between OSS paths.
updateUpdates the ossutil version.
websiteAdds static website hosting, redirection, or back-to-origin configurations to a bucket, or modifies, queries, deletes the static website hosting, redirection, or back-to-origin configurations of a bucket.
wormQueries the retention policies configured for a bucket.