The cp command facilitates efficient data management and migration, and enables the uploading, downloading, and copying of objects stored within buckets.
Note
Please make sure that the necessary permissions have been granted before initiating upload, download, or copy operations. For more information, see Grant custom policy permissions to RAM users.
Upload files
By using the cp command, you can upload local objects such as files, images, and videos to OSS buckets. Uploading large objects is supported.
To refine the selection of objects during batch upload, specify the --include and --exclude options within this command. These options ensure that only objects that meet specified criteria are uploaded.
Download files
You can run the cp command to download resources, such as images and videos, from OSS buckets to your local computer. For example, you can download multiple objects, download objects at a limited speed, or download a specific version of an object in a versioned bucket.
Copy files
You can run the cp command to copy files between directories within the same bucket or across buckets in the same region without modifying their content.