ossutil 1.0

更新时间:
复制 MD 格式

ossutil lets you manage OSS data from the command line on Windows, Linux, and macOS.

Upgrade to ossutil 2.0

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

Key features of ossutil 2.0

  • New command syntax: Supports multi-level commands, including API-level commands (ossutil api put-bucket-acl) and high-level commands (ossutil config).

  • Simplified configuration: Specify only the AccessKey ID, AccessKey secret, and region ID for basic setup. Use the --profile parameter to manage multiple configuration files.

  • Rich filtering: Filter by path, file size, last modified time, and object metadata in batch commands such as ls, cp, and rm.

  • Flexible output: Set output format to JSON, YAML, or XML with --output-format. Use --output-query to filter output fields.

  • Enhanced security: Pass sensitive parameters through environment variables to avoid exposing keys in the command line. Use --dry-run to verify commands before execution.

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 lists common ossutil commands.

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

Manages bucket encryption configurations.

bucket-policy

Manages bucket policy configurations.

bucket-tagging

Manages bucket tagging configurations.

bucket-versioning

Adds or queries bucket versioning configurations.

cat

Exports object content to ossutil.

config

Creates a configuration file to store OSS access information.

cors (cross-origin resource sharing)

Manages CORS configurations for a bucket.

cors-options

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

cp

Uploads, downloads, or copies objects.

create-symlink (Create symbolic link)

Creates a symbolic link.

du

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

getallpartsize

Queries part sizes of incomplete multipart uploads in a bucket.

hash

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

help

Displays help information for a command.

inventory

Manages bucket inventory configurations.

lifecycle

Manages bucket lifecycle configurations.

listpart

Lists parts of an incomplete multipart upload for an object.

logging

Manages bucket logging configurations.

lrb

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

ls

Lists buckets, objects, or parts.

mb

Creates a bucket.

mkdir (create a directory)

Creates a directory in a bucket.

object-tagging

Manages object tagging configurations.

probe

Monitors OSS access and troubleshoots upload/download issues.

read-symlink (read symbolic links)

Reads the description of a symbolic link.

referer

Manages bucket hotlink protection configurations.

replication

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

request-payment

Manages pay-by-requester configurations for a bucket.

resource-group

Manages bucket resource group configurations.

Restore Files

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

revert-versioning

Recovers a deleted object to its most recent version.

rm

Deletes buckets, objects, or parts.

set-acl (Set or modify ACLs)

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

set-meta (Manage object metadata)

Configures the metadata of an uploaded object.

sign (generate a signed URL)

Generates a signed URL for an object to share with third parties.

stat (View bucket and object information)

Obtains the description of a 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

Manages static website hosting, redirection, and back-to-origin configurations for a bucket.

worm (retention policy)

Queries the retention policies of a bucket.

View options

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

FAQ

For more information, see FAQ.