The Ozone shell commands enable you to create, delete, view, and list
buckets.
Creating a bucket
Command Syntax |
ozone sh bucket create /<volumename>/<bucketname>
|
Purpose |
Creates a bucket in the specified volume. |
Arguments |
The name of the bucket to create in the /volume/bucket
format. |
Example |
ozone sh bucket create /vol1/buck1 This command creates a
bucket buck1 in the volume vol1. |
Deleting a bucket
Command Syntax |
ozone sh bucket delete /<volumename>/<bucketname>
|
Purpose |
Deletes the specified bucket, which must be empty. |
Arguments |
The name of the bucket to delete in the /volume/bucket
format. |
Example |
ozone sh bucket create /vol1/buck2 This command deletes
the bucket buck2. |
Viewing bucket information
Command Syntax |
ozone sh bucket info /<volumename>/<bucketname>
|
Purpose |
Provides information about the specified bucket. |
Arguments |
The name of the bucket whose details you want to view. |
Example |
ozone sh bucket info /vol1/buck3 This command provides
information about bucket buck3. |
Listing buckets
Command Syntax |
ozone sh bucket list /<volumename> --length=<number_of_buckets> --prefix=<bucket_prefix> --start=<starting_bucket>
|
Purpose |
Lists all the buckets in a specified volume. |
Arguments |
- -l, length: Specifies the maximum number of results to return. The
default is 100.
- -p, prefix: Lists bucket names that match the specified prefix.
- -s, start: Returns results starting with the bucket after
the specified value.
- The name of the volume whose buckets you want to list.
|
Example |
ozone sh bucket list /vol2 This command lists all the
buckets in volume vol2. |