Skip to main content
After configuring ossctl, you can use the command line to upload objects, download objects, batch-copy directories, or list objects in Buckets.

Pre-Action Confirmation

  • An OSS bucket has been created, and you have obtained permission to access it.
  • Access Keys have been obtained, and ossctl has been configured.
  • The current environment can access the OSS Endpoint in the Region where the bucket is located.

Upload Objects

Uploading a Single Object

Use the put command to upload a single object.
Parameter description: After the command is executed, you can list the objects in the target Buckets to confirm that the object has been created.

Upload Directories in Batches

Use the cp command to recursively upload a directory.
Parameter description: After the command is executed, verify that the files in the directory have been uploaded to the target bucket and that the object paths are as expected.

Download Objects

Download a Single Object

Use the get command to download a single object.
Parameter description: After the command has finished executing, verify that the file has been generated in the local directory.

Batch Download Directories

Use the cp command to recursively download a directory.
Parameter description: After the command is executed, verify in the local directory that the file structure and number of files meet expectations.

List objects

Use the ls command to list objects in Buckets.
Parameter description: If uploading, downloading, or listing objects fails, first check the local path, object path, Bucket Name, Access Keys, bucket permissions, and network connectivity. If the issue persists, record the command, error message, and Bucket Name, and contact technical support.