This section uses the Linux OS as an example to describe how to use obsutil to perform basic operations in OBS. For details, see .
./obsutil mb obs://bucket-test Create bucket [bucket-test] successfully!
./obsutil cp /temp/test.txt obs://bucket-test/test.txt Parallel: 5 Jobs: 5 Threshold: 52428800 PartSize: 5242880 VerifyLength: false VerifyMd5: false CheckpointDir: /temp/.obsutil_checkpoint test.txt:[==============================================] 100.00% 48.47 KB/s 0s Upload successfully, 4.44KB, /temp/test.txt --> obs://bucket-test1/test.txt
To upload local folder test to the OBS bucket, run the following command:
./obsutil cp /test/ obs://bucket-test -r -f
./obsutil cp obs://bucket-test/test.txt /temp/test1.txt Parallel: 5 Jobs: 5 Threshold: 52428800 PartSize: 5242880 VerifyLength: false VerifyMd5: false CheckpointDir: /temp/.obsutil_checkpoint test.txt:[=============================================] 100.00% 775.52 KB/s 0s Download successfully, 4.44KB, obs://bucket-test1/test.txt --> /temp/test1.txt
To download directory test from the OBS bucket to the local folder temp, run the following command:
./obsutil cp obs://bucket-test/test /temp -r -f
./obsutil rm obs://bucket-test/test.txt -f Delete object [test.txt] in the bucket [bucket-test] successfully!
./obsutil rm obs://bucket-test -f Delete bucket [bucket-test] successfully!