All Products
Search
Document Center

Object Storage Service:ossutil 1.0

Last Updated:Jan 10, 2025

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

Upgraded features

We recommend you use ossutil2.0. For information about how to quickly install and use ossutil, see Install ossutil.

Key features of ossutil 2.0:

  • New command syntax: Multi-level commands are introduced, including API-level commands, such as ossutil api put-bucket-acl, and high-level commands, such as ossutil config.

  • Optimized configuration mechanism: The initial configuration process is simplified. You need only to specify the AccessKey ID, AccessKey secret, and region ID to complete the basic configurations after you install ossutil. You can also specify multiple configuration files by using the --profile parameter, which enhances flexibility.

  • Multiple filter parameters: Various filter conditions based on path, file size, last modified time, and object metadata are provided for batch processing commands, such as ls, cp, and rm, which greatly improves the accuracy and efficiency of operations.

  • Flexible output formats: You can use the --output-format parameter to set the output format of output files to JSON, YAML, or XML to better meet different data processing requirements. You can also specify the--output-query option to filter output files to obtain the required information.

  • Enhanced security: To improve data security, ossutil 2.0 allows users to specify sensitive parameters by using environment variables, which avoids exposing keys in the command line and reduces leakage risks. In addition, the --dry-run option allows users to verify their behavior before the commands are executed, which ensures that the operations are correct.

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.

Command

Description

access-monitor

Specifies the access tracking state of a bucket.

appendfromfile

Appends content to existing appendable objects.

bucket-cname

Queries the CNAME configurations of a bucket.

bucket-encryption

Adds encryption configurations to a bucket, or modifies, queries, and deletes the encryption configurations of a bucket.

bucket-policy

Adds bucket policy configurations to a bucket, or modifies, queries, and deletes the bucket policy configurations of a bucket.

bucket-tagging

Adds tagging configurations to a bucket, or modifies, queries, and deletes the tagging configurations of a bucket.

bucket-versioning

Adds versioning configurations to a bucket, or queries the versioning configurations of a bucket.

cat

Exports object content to ossutil.

config

Creates a configuration file to store information that is required to access OSS.

cors

Adds cross-origin resource sharing (CORS) configurations to a bucket, or modifies, queries, deletes the cross-origin resource sharing (CORS) configurations of a bucket.

cors-options

Tests whether a bucket allows a specified cross-origin request.

cp

Uploads, downloads, or copies objects.

create-symlink

Creates a symbolic link.

du

Queries the storage usage of a specified bucket, object, or directory.

getallpartsize

Queries the size of each part of incomplete multipart upload tasks in a bucket and the total size of these parts.

hash

Calculates the CRC-64 or MD5 hash of a local file.

help

Queries help information about a command. We recommend that you run the help command to query information about how to run a specified command.

inventory

Adds inventory configurations to a bucket, or queries, lists, deletes the inventory configurations of a bucket.

lifecycle

Adds lifecycle configurations to a bucket, or modifies, queries, deletes the lifecycle configurations of a bucket.

listpart

Lists the parts generated in an incomplete multipart upload task initiated for an object.

logging

Adds logging configurations to a bucket, or modifies, queries, deletes the logging configurations of a bucket.

lrb

Lists the buckets that are located in a region or multiple regions.

ls

Lists buckets, objects, or parts.

mb

Creates a bucket.

mkdir

Creates a directory in a bucket.

object-tagging

Adds tagging configurations to a bucket, or modifies, queries, deletes the tagging configurations of an object.

probe

Monitors 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-symlink

Reads the description of a symbolic link.

referer

Adds hotlink protection configurations to a bucket, or modifies, queries, deletes the hotlink protection configurations of a bucket.

replication

Manages the Cross-Region Replication (CRR) configurations of a bucket.

request-payment

Configures the pay-by-requester mode for a bucket or queries the pay-by-requester configurations of a bucket.

resource-group

Configures a resource group for a bucket and queries information about the resource group.

restore

Restores an object from the frozen state to the readable state.

revert-versioning

Recovers a deleted object to the most recent version of the object.

rm

Deletes buckets, objects, or parts.

set-acl

Configures the access control list (ACL) for a bucket or an object.

set-meta

Configures the metadata of an uploaded object.

sign

Generates a signed URL for an object and shares the signed URL with third parties for downloads or previews.

stat

Obtains the description of a specified bucket or object.

style

Configures image styles.

sync

Synchronizes local files to OSS, OSS objects to local disks, or objects between OSS paths.

update

Updates the ossutil version.

website

Adds 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.

worm

Queries the retention policies configured for a bucket.

View options

For more information about the command-line options, see View options.

FAQ

For more information, see FAQ.